1. Basic Information
- Title: PLC2SHELL: Pre-Auth RCE in CODESYS Control Runtime
- Source: Limes Security
- Published: 2026-12-02
- Original: Limes Security
- Related Sources: CODESYS Security Advisory 2026-17, Dark Reading: Millions of PLCs At Risk From 40 New CODESYS Bugs, CERT@VDE: VDE-2026-154
- Severity (Author's Priority): critical
2. One-Line Summary
Code execution on Windows, Linux, VxWorks, and Schneider Modicon M241 was demonstrated in a research environment by exploiting an unauthenticated out-of-bounds write in CODESYS Control Runtime's online service packet handling. Successful exploitation could affect control logic or physical processes.
3. Attack Flow
Path 1: From online service packet to runtime code execution
- An attacker reaches the CODESYS online service over the network.
- The attacker sends a crafted online service packet without authentication.
- Insufficient length validation causes an out-of-bounds write.
- Limes Security demonstrated code execution even with ASLR enabled. Different techniques were required for Windows, Linux, and VxWorks.
- This could affect PLC control logic or physical processes.
4. Attacker Position and Execution Location
- An unauthenticated attacker on an IT or OT network who can reach the CODESYS online service.
5. Visibility for Victims and Administrators
Victim
- On-site, this may appear as PLC halts, logic anomalies, or HMI display changes.
Administrator
- Clues include online service packets from unknown sources, runtime crashes, and logic download or configuration changes.
6. Success and Failure Conditions
Success Conditions
- The target runs an affected version of a CODESYS runtime.
- The attacker can reach the online service over the network.
Failure Conditions and Mitigations
- Update to a patched version of the affected product or firmware explicitly marked as patched by the OEM.
- Restrict the online service to trusted engineering workstations.
- Remove internet exposure and use a VPN with strong authentication.
7. Impact of Successful Exploitation
- Arbitrary code execution on the PLC runtime.
- Modification of control logic and configuration.
- Potential halt or unsafe operation of physical processes.
8. Observable Logs
- Host and Application Logs: Runtime crashes, logic downloads, firmware or configuration changes.
- Identity and Access Activity: Authentication and operations on engineering workstations.
- Network Activity: CODESYS online service traffic from unexpected sources.
9. Exploitation Assessment
- Initial code execution demonstrated in a research environment: Limes Security demonstrated code execution on Windows, Linux, and VxWorks runtimes, as well as Modicon M241, in a research environment. This was a demonstration in an authorized research environment; active exploitation in third-party environments is unconfirmed.
10. Investigation Playbook
- Investigation Triggers: CODESYS online service traffic from unknown sources, runtime crashes, or logic changes.
- Initial Checks: Check affected versions, exposure scope, authentication requirements, and whether the affected feature is used.
- Evidence Preservation: Preserve product logs, configuration change history, and related files.
- Identity and Access Review: Review authentication history, privileges, and secret usage history.
- Follow-on Activity: Investigate suspicious execution, configuration changes, internal reconnaissance, and credential usage.
- Containment: Isolate affected PLCs following safety procedures, test and deploy OEM patches, and restrict engineering paths.
- Incident Assessment: Distinguish between reachability, attempts, successful authentication or execution, information acquisition, and follow-on compromise.
11. Defense and Detection Ideas
- Single-Event Detection: Online service packets from non-engineering terminals.
- Event Correlation: Correlate unknown traffic -> runtime anomalies -> logic downloads or output changes.
- Threat Hunting: Inventory OEM products, runtime versions, online service exposure, and engineering terminals.
- Logging Gaps: PLCs may not retain detailed packet or process telemetry.
- Priority Controls: Prioritize asset identification, network restrictions, and OEM update planning.
12. Facts / Inference / Hypothesis
Facts
- CVE-2026-127148 is an out-of-bounds write caused by insufficient packet length validation in CmpChannelMgr-related online service handling.
- An unauthenticated network attacker can execute arbitrary code using a crafted packet.
- Limes Security demonstrated code execution on Windows, Linux, and VxWorks runtimes, and on Modicon M241.
- The overall research covers approximately 40 vulnerabilities, with the first 11 disclosed on November 24 and 30.
- According to Advisory 2026-17, affected versions include 3.0.0.0 to before 3.5.22.50 for CODESYS Control RTE (SL) and Control Win (SL), and 3.5.0.0 to before 4.24.0.0 for CODESYS Control for Linux SL and related products. Version 4.24.0.0 for the latter group is scheduled for release in December 2026 per the advisory. Visualization 4.11.0.0 is a fix for four separate vulnerabilities listed in VDE-2026-154.
- Limes Security plans to withhold exploit details while updates for affected products are rolled out.
Inference
- Due to white-label embedding, affected PLCs may exist even if the CODESYS name does not appear in asset inventories.
Hypothesis
- None
13. MITRE ATT&CK Mapping
| ID | Technique | Confidence | Basis |
|---|---|---|---|
| T1190 | Exploit Public-Facing Application | high | Applies if an exposed CODESYS online service is used for initial access. Limes Security's demonstration is limited to a research environment. |
| T0831 | Manipulation of Control | medium | Applies if code execution on the runtime is used to alter control logic or physical processes. Public disclosures only demonstrate code execution. |
14. Unknowns and Further Investigation
- Affected versions, patched versions, and rollout schedules across all platforms vary by OEM.
- Active exploitation has not been confirmed.
15. Impact on SOCs and Organizations
Manufacturing and infrastructure organizations should verify which devices use CODESYS runtimes by checking their firmware as well as product names. Restrict access to the online service to engineering workstations.
16. Summary by Audience
- For SOCs: Monitor for CODESYS online service traffic from unexpected sources, abnormal runtime terminations, and PLC logic changes.
- For Administrators: Check OEM advisories and restrict the online service to trusted engineering terminals until patched versions are tested and deployed.
- For Users: On-site staff should immediately report unexpected PLC halts, logic changes, or HMI changes to control engineers.
Top comments (0)