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."
| CVE | Type (CWE) | CVSS 3.1 | Official impact | Role in the chain |
|---|---|---|---|---|
| CVE-2021-22779 | CWE-290 Authentication Bypass by Spoofing | 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) | Unauthorized read/write to the controller | Keystone: defeats authentication |
| CVE-2020-7537 | CWE-754 Improper Check for Exceptional Conditions | 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) | Denial of service | Assessed: memory read leaks password hash |
| CVE-2018-7852 | CWE-248 Uncaught Exception | 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) | Denial of service | Assessed: pointer dereference reaches code execution |
| Field | Value |
|---|---|
| Affected products | Modicon M340 (BMXP34*) and M580 (BMEP*/BMEH*) PLCs. CVE-2020-7537 and CVE-2018-7852 also list Modicon Quantum and Premium. |
| Protocol / interface | Modbus TCP (port 502) and the Schneider UMAS engineering protocol layered on it |
| Research / attack name | "ModiPwn", disclosed by Armis (2021) |
| Vendor advisories | SEVD-2021-194-01 (CVE-2021-22779), SEVD-2020-343-08 (CVE-2020-7537), SEVD-2019-134-11 (CVE-2018-7852) |
| Public proof-of-concept | A public PoC exists for CVE-2018-7852; Armis published PoC scripts for the ModiPwn chain |
| Listed on CISA KEV | No |
| Document scope | OT/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:
- CVE-2021-22779 defeats the controller's authentication by spoofing the engineering session, giving unauthorized read and write access.
- CVE-2020-7537 is then used to read controller memory and leak the stored application password hash.
- 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:
- 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.
- 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.
- 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.
- 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.
- 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).
| Step | Tool / method | Output | Why it matters |
|---|---|---|---|
| Find Modbus endpoints | Scan the OT subnet for TCP 502 (nmap) | Live Modbus devices | Port 502 reachability is the entry condition for the whole chain |
| Fingerprint the PLC | UMAS/Modbus identification requests; ICS-aware tools | Vendor = Schneider, model = M340 / M580, firmware version | Confirms the controllers are in scope and whether firmware is patched |
| Confirm the interface | Passive capture of an engineering session, or an identification exchange | UMAS reachable; reservation state | Confirms 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- Entry conditionOn-network access to M340 / M580Port 502 (Modbus / UMAS) reachable.
- Stage 1 · CVE-2021-22779Authentication bypassSpoof the Modbus/UMAS session → unauthenticated read/write to the controller.
- Stage 2 · CVE-2020-7537Read controller memoryA Read Physical Memory request leaks the application password hash and memory layout.
- Stage 3 · CVE-2018-7852Untrusted pointer dereferenceAn invalid private command, plus the leaked memory layout, turns the fault into code execution.
- 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)
| CVE | Official impact | Standalone effect | Contribution to the chain |
|---|---|---|---|
| CVE-2021-22779 | Confidentiality + Integrity + Availability (9.8) | Unauthorized read/write to the controller | Opens privileged access with no credentials |
| CVE-2020-7537 | Availability only (DoS, 7.5) | Crash the controller with a crafted read | Leaks the password hash / memory layout |
| CVE-2018-7852 | Availability only (DoS, 7.5) | Crash the controller with an invalid command | Provides 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
| CVE | Fix | Note |
|---|---|---|
| CVE-2021-22779 | Update firmware per SEVD-2021-194-01; enable the controller's application-password / Enforced Security (CEI) features | Removing the auth bypass collapses the chain at the keystone |
| CVE-2020-7537 | Update firmware per SEVD-2020-343-08 (fixed in M580 and M340 maintenance releases) | Closes the memory-read primitive |
| CVE-2018-7852 | Update firmware per SEVD-2019-134-11 | Closes 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.
- NVD: CVE-2021-22779, CVE-2020-7537, CVE-2018-7852
- Armis: "ModiPwn" research on Modicon M340/M580
- CISA ICS advisory: ICSA-21-194-02 — Schneider Electric Modicon Controllers and Software
- Schneider Electric advisories: SEVD-2021-194-01, SEVD-2020-343-08, SEVD-2019-134-11
- Background: Modbus protocol specifications; Schneider UMAS engineering protocol (Kaspersky ICS-CERT)
- MITRE ATT&CK for ICS: Discovery (TA0102), Lateral Movement, Impair Process Control / Modify Controller Tasking
Security case study · Industrial & OT Cybersecurity · Published Jul 22, 2026