OT / ICS security research · Case study

ModiPwn — Chained Takeover of Schneider Modicon M340 / M580 PLCs

(CVE-2021-22779, CVE-2020-7537, CVE-2018-7852)

  • Industrial & OT Cybersecurity
  • Published
  • 12 min read

Highest CVSS 3.1 score

9.8/10

Critical

CVE-2021-22779 · Chain of 3 CVEs · Network · No credentials

Case study

1. Metadata & Identification

Grouped study. This analysis covers three Schneider Electric Modicon vulnerabilities that, individually, look moderate, but chained together allow an unauthenticated attacker on the control network to take over a Modicon M340 or M580 PLC. The chain was demonstrated publicly by Armis under the name "ModiPwn."

CVEType (CWE)CVSS 3.1Official impactRole in the chain
CVE-2021-22779CWE-290 Authentication Bypass by Spoofing9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)Unauthorized read/write to the controllerKeystone: defeats authentication
CVE-2020-7537CWE-754 Improper Check for Exceptional Conditions7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)Denial of serviceAssessed: memory read leaks password hash
CVE-2018-7852CWE-248 Uncaught Exception7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)Denial of serviceAssessed: pointer dereference reaches code execution
FieldValue
Affected productsModicon M340 (BMXP34*) and M580 (BMEP*/BMEH*) PLCs. CVE-2020-7537 and CVE-2018-7852 also list Modicon Quantum and Premium.
Protocol / interfaceModbus TCP (port 502) and the Schneider UMAS engineering protocol layered on it
Research / attack name"ModiPwn", disclosed by Armis (2021)
Vendor advisoriesSEVD-2021-194-01 (CVE-2021-22779), SEVD-2020-343-08 (CVE-2020-7537), SEVD-2019-134-11 (CVE-2018-7852)
Public proof-of-conceptA public PoC exists for CVE-2018-7852; Armis published PoC scripts for the ModiPwn chain
Listed on CISA KEVNo
Document scopeOT/ICS exposure, the chained attack path to PLC code execution, and break-the-chain remediation

A note on severity and why this is a chain. Two of the three CVEs are officially scored as denial-of-service only (availability impact, no confidentiality or integrity). A vulnerability scanner therefore reports them as moderate and unrelated. The ModiPwn research showed that when they are combined with the critical authentication bypass, the "DoS" primitives become an information leak and a code-execution primitive. The real risk lives in the combination, which no per-CVE score reveals. This is precisely the gap an attack-vector analysis is meant to close.

2. Executive Summary

Schneider Electric Modicon M340 and M580 are among the most widely deployed PLCs in water, power, manufacturing, and building automation. They are programmed and controlled over Modbus TCP (port 502) using Schneider's UMAS protocol.

The ModiPwn chain lets an attacker who can reach a controller's port 502 take it over without any credentials:

  1. CVE-2021-22779 defeats the controller's authentication by spoofing the engineering session, giving unauthorized read and write access.
  2. CVE-2020-7537 is then used to read controller memory and leak the stored application password hash.
  3. CVE-2018-7852 turns a memory fault into native code execution on the PLC.

The end state is arbitrary code running on the controller, with the attacker able to change how the process behaves while hiding those changes from the engineering workstation. No login is required; the only precondition is network reachability to port 502.

The central finding is that the defense is reachability, not patching alone. These controllers were never meant to be exposed, and firmware fixes exist, but many installed devices run old firmware and sit on flat networks. Because the entire chain depends on reaching port 502, breaking that reachability, or breaking any single link, collapses the attack.

3. Technical Analysis & Root Cause

The shared surface: Modbus and UMAS on port 502. Modicon controllers accept engineering operations (read/write variables, upload/download logic, start/stop the CPU) over the UMAS protocol carried inside Modbus TCP on port 502. UMAS has a weak session model: a client "reserves" the controller and is then trusted. The ModiPwn chain attacks that trust.

CVE-2021-22779 — authentication bypass (the keystone). The controller's reservation/authentication check can be bypassed by spoofing the Modbus/UMAS exchange between the engineering software and the controller. The result is unauthorized read and write access to the controller over the network, with no valid credentials. Officially rated CVSS 9.8 because it breaks confidentiality, integrity, and availability at once. This is the link that converts "network reachability" into "privileged control access."

CVE-2020-7537 — memory read (officially DoS). A crafted Read Physical Memory request over Modbus triggers an improper check for an exceptional condition (CWE-754). Officially this is scored as denial of service (availability only). Assessed in the ModiPwn chain: the same read primitive can be used to read controller memory and leak the stored application password hash and memory layout, which makes the next step reliable.

CVE-2018-7852 — code execution (officially DoS). An invalid private command parameter sent over Modbus causes an uncaught exception (CWE-248). Officially this is denial of service. Assessed in the ModiPwn chain: the underlying fault is an untrusted pointer dereference that, combined with the memory knowledge from the previous step, can be driven to native code execution on the controller.

Root cause, in one line. The controllers trust the engineering channel more than they should: authentication can be spoofed, and the Modbus/UMAS command handlers do not safely validate memory-access and private-command parameters. The protocol was built for a trusted, isolated network that no longer exists.

Fact vs assessment. CVE-2021-22779's critical rating is official. The use of CVE-2020-7537 as an information leak, and CVE-2018-7852 as a code-execution primitive, is the assessed behavior demonstrated by Armis, beyond the CVEs' official denial-of-service ratings. We present both so the reader can see why the chain outranks its parts.

4. Proof of Concept (PoC) / Attack Vector

This section documents the attack-vector methodology: the reconnaissance and the chained path, at the level needed for defensive planning. Public PoC code exists for parts of this chain; this document does not reproduce it.

4.1 Reconnaissance (one shared scope for the whole chain)

An attacker profiles one target environment, not one per CVE. Unlike an internet-facing service, the ModiPwn chain needs reachability to the controller's Modbus/UMAS interface on the OT network, so reconnaissance has two halves.

Half 1: reaching the OT network. Modicon controllers are not meant to face the internet, so the attacker first has to earn a position inside, or adjacent to, the control network from which port 502 is reachable. In practice this happens through one of the following routes, roughly easiest to hardest:

  1. Compromise a corporate IT host, then pivotPhish an employee or steal VPN credentials to land on the corporate (IT) network, then move toward the control network wherever the boundary is weak: an over-permissive IT-to-OT firewall rule, a dual-homed server on both networks, or a shared management VLAN. Flat or lightly segmented networks make this a short hop.
  2. Abuse an engineering or jump hostEngineering workstations and OT jump hosts are, by design, allowed to talk to controllers on port 502. Taking over one (for example through a malicious project file, a browser or email compromise, or reused credentials) hands the attacker the exact reachability the chain needs, from a trusted source address.
  3. Ride a vendor or remote-support pathIntegrators and maintenance vendors often hold standing remote tunnels into the OT environment. Compromising the vendor, or a vendor laptop that moves between sites, places the attacker on a segment that can already reach the controllers.
  4. Connect on-site or via a transient devicePhysical or near-physical access (a plant LAN port, a rogue wireless access point, or a USB-delivered implant on an OT host) puts the attacker directly on the control network.
  5. Exploit a genuinely exposed controllerOccasionally a Modicon device is reachable from the internet through a misconfiguration or a forgotten NAT rule. Internet-wide scan services (such as Shodan) surface these, and no pivot is then required.

The shared goal of every route is the same: a network position from which the controller's TCP 502 answers. Once the attacker has that, the on-network discovery below begins.

Half 2: on-network discovery (satisfies the precondition for every CVE in the chain).

StepTool / methodOutputWhy it matters
Find Modbus endpointsScan the OT subnet for TCP 502 (nmap)Live Modbus devicesPort 502 reachability is the entry condition for the whole chain
Fingerprint the PLCUMAS/Modbus identification requests; ICS-aware toolsVendor = Schneider, model = M340 / M580, firmware versionConfirms the controllers are in scope and whether firmware is patched
Confirm the interfacePassive capture of an engineering session, or an identification exchangeUMAS reachable; reservation stateConfirms the authentication surface CVE-2021-22779 targets

The output of reconnaissance is a single fact: a reachable, fingerprinted M340 or M580 whose port 502 / UMAS interface answers. That one fact is the precondition for all three CVEs.

4.2 Attack Path: the ModiPwn chain (each CVE is one stage)

Each stage's output is the next stage's precondition. Preconditions are labeled on the arrows; each box is one CVE.

The ModiPwn chain: on-network access → PLC code execution

Break any one link to stop the chain
  1. Entry conditionOn-network access to M340 / M580Port 502 (Modbus / UMAS) reachable.
  2. Stage 1 · CVE-2021-22779Authentication bypassSpoof the Modbus/UMAS session → unauthenticated read/write to the controller.
  3. Stage 2 · CVE-2020-7537Read controller memoryA Read Physical Memory request leaks the application password hash and memory layout.
  4. Stage 3 · CVE-2018-7852Untrusted pointer dereferenceAn invalid private command, plus the leaked memory layout, turns the fault into code execution.
  5. End stateNative code execution on the PLCChange process logic; hide the change from the engineering workstation.

Precondition vs standalone (important for the operator).

  • CVE-2021-22779 needs only port 502 reachability. It is the enabling link; without it the later steps have no privileged access.
  • CVE-2020-7537's value as an information leak depends on the access that 22779 provides.
  • CVE-2018-7852's path to code execution is made reliable by the memory layout leaked in the previous step.

Individually: an authentication bypass, an information leak, and a crash. Chained: unauthenticated network access to full PLC code execution.

5. Impact Assessment

5.1 End state of the chain (the headline)

Native code execution on a Modicon M340 or M580 means the attacker can alter the control logic the PLC runs, inject unauthorized commands to the process, and mask those changes so the engineering workstation still shows the original, expected program. In a live plant this is a process-integrity and safety risk, not merely an outage: setpoints, interlocks, and actuator commands can be changed while operators believe nothing has changed.

5.2 Per-CVE impact (shows the escalation)

CVEOfficial impactStandalone effectContribution to the chain
CVE-2021-22779Confidentiality + Integrity + Availability (9.8)Unauthorized read/write to the controllerOpens privileged access with no credentials
CVE-2020-7537Availability only (DoS, 7.5)Crash the controller with a crafted readLeaks the password hash / memory layout
CVE-2018-7852Availability only (DoS, 7.5)Crash the controller with an invalid commandProvides the code-execution primitive

The pattern: two links are officially "just a DoS." Their real danger appears only once they are chained behind the authentication bypass. A program that prioritizes purely by CVSS would under-rate this chain.

6. Remediation & Mitigation

The organizing idea is break any one link. The chain needs all three steps and, before them, reachability to port 502. Removing any single dependency defeats the whole attack, which gives several independent lines of defense.

6.1 Break the first dependency: reachability to port 502

  • Segment the control network so only named engineering stations can reach controller port 502. This alone defeats the entire chain, patched or not.
  • Firewall / ACL Modbus (TCP 502) at the cell/zone boundary; deny it from IT, corporate, and remote-access zones.
  • Never expose a Modicon controller to the internet; verify with external scanning that none are reachable.

6.2 Break the links: vendor fixes per CVE

CVEFixNote
CVE-2021-22779Update firmware per SEVD-2021-194-01; enable the controller's application-password / Enforced Security (CEI) featuresRemoving the auth bypass collapses the chain at the keystone
CVE-2020-7537Update firmware per SEVD-2020-343-08 (fixed in M580 and M340 maintenance releases)Closes the memory-read primitive
CVE-2018-7852Update firmware per SEVD-2019-134-11Closes the code-execution primitive

6.3 Compensating controls where firmware cannot be updated

Many installed controllers run old firmware and cannot be patched during production. For those:

  • Enforce Modbus/UMAS access control at the network layer (allow-list engineering stations only).
  • Enable the controller's security features (application password, memory protection, disable unused services/ports) where the firmware supports them.
  • Monitor for the chain's signatures: unexpected UMAS reservations, Read Physical Memory requests, controller mode changes (stop/run), and program downloads outside change windows.

6.4 OT process controls

  • Change control for any firmware update or PLC download: dual approval, tested maintenance window.
  • Program integrity checks: periodically compare the running PLC logic against a known-good baseline, since the chain's goal is to hide logic changes.
  • Detection and alerting on anomalous port-502 activity and on controller CPU faults (the DoS symptoms of CVE-2020-7537 / CVE-2018-7852 may be the first visible sign of an attempt).

One-line summary: the ModiPwn chain turns three moderate-looking Modicon bugs into full PLC takeover, but every step depends on reaching port 502 and on the authentication bypass. Segment the control network and remove the auth bypass, and the chain has nowhere to start.

7. References & Credits

Credits. The ModiPwn chain was researched and disclosed by Armis. The vulnerabilities were coordinated with Schneider Electric and published in SEVD advisories and a CISA ICS advisory.

References.

Security case study · Industrial & OT Cybersecurity · Published Jul 22, 2026

Back to top ↑

Back to all case studies