CODESYS Control Runtime Pre-Auth RCE (CVE-2026-127148)
An unauthenticated packet to CODESYS Control's online service can execute code on PLCs; 13 products are fixed in 3.5.22.50 and 13 await 4.24.0.0.
TL;DR
- CODESYS Control's online-service packet handling has an out-of-bounds write. The
CmpChannelMgrandCmpChannelMgrEmbeddedcomponents check packet lengths incorrectly, so an unauthenticated packet can overwrite memory and run code on the controller. - Twenty-six CODESYS products are affected. Thirteen are fixed in 3.5.22.50, and thirteen Linux and embedded products wait for 4.24.0.0, planned for December 2026.
- CERT@VDE rates CVE-2026-127148 CVSS v3.1 9.8 Critical. No in-the-wild exploitation or public exploit code is reported, and the CVE is not in CISA KEV as of 2026-12-03.
- Install 3.5.22.50 where it exists, ask the device manufacturer for firmware on embedded controllers, and restrict online services to trusted engineering systems until 4.24.0.0 ships.
Am I affected?
All of these must hold:
- The device runs a CODESYS Control runtime, or another affected CODESYS component such as the Gateway, HMI, Runtime Toolkit, Safety SIL2 or the Development System simulation.
- The installed version is in one of the affected ranges in the table.
- The online service, the interface used to program and manage the controller, is reachable from a network you do not fully trust.
For CVE-2026-127148, the attacker needs no credentials. The companion CVEs in the same advisories have different preconditions.
Embedded runtimes count even when the product carries another manufacturer's brand. CODESYS says about 1,000 device types from more than 500 manufacturers are based on its runtime, and operators often cannot tell a CODESYS-based device from the label alone.
| Branch | Affected products | Affected versions | Fixed version |
|---|---|---|---|
| Windows-based runtimes and toolkits | Control RTE (SL), Control RTE for Beckhoff CX SL, Control Win (SL), Development System 3, Edge Gateway for Windows, Embedded Target Visu Toolkit, Gateway, HMI (SL), OPC DA Server SL, PLCHandler, Remote Target Visu, Runtime Toolkit, Safety SIL2 | 3.0.0.0 to before 3.5.22.50 | 3.5.22.50, available |
| Linux, ARM and embedded runtimes | Control for BeagleBone SL, Control for IOT2000 SL, Control for Linux ARM SL, Control for Linux SL, Control for PFC100 SL, Control for PFC200 SL, Control for PLCnext SL, Control for Raspberry Pi SL, Control for WAGO Touch Panels 600 SL, Control for emPC-A/iMX6 SL, Edge Gateway for Linux, TargetVisu for Linux SL, Virtual Control SL | 3.5.0.0 to before 4.24.0.0 | 4.24.0.0, planned for December 2026 |
The advisory splits the products into these two groups. The Development System's simulation runtime is in the first group, which puts engineering workstations in scope as well as controllers.
Check the installed version on a Windows soft PLC:
Get-ChildItem 'C:\Program Files (x86)','C:\Program Files' -Directory -Filter 'CODESYS*' -ErrorAction SilentlyContinue |
Select-Object -ExpandProperty Name
Check a Linux runtime with the package manager that installed it:
dpkg -l | grep -i codesys
rpm -qa | grep -i codesys
On an embedded controller, read the runtime version in the CODESYS device view or the device's web interface. If the version is hidden behind the manufacturer's firmware number, ask the manufacturer which CODESYS runtime the firmware contains. Limes Security publishes an exposure scan and a version checker that you can use as a second opinion.
Limes Security says the online service listens on TCP 11740 and 1217. Check whether those ports are reachable from outside the controller's trusted network:
nmap -Pn -sV -p 11740,1217 <controller-address>
Limes Security's scan on 2026-12-03 found 1,094 confirmed CODESYS controllers reachable from the internet across 43 countries. Of the 417 devices that reported a runtime version, none was on a fixed release. WAGO devices were the largest group, followed by Schneider Electric, INVT, OWEN and Turck.
How do I fix it?
Upgrade every affected CODESYS component to 3.5.22.50 where that release exists. The fixed build installs through the CODESYS Installer or the vendor's download area.
- Open the CODESYS Installer and select the 3.5.22.50 runtime and the matching Development System.
- Update the runtime on each Windows-based soft PLC and toolkit installation, not only the engineering workstation.
- Confirm the new version in the device view before returning the controller to service.
- For a Linux, ARM, PFC, PLCnext, WAGO or Raspberry Pi runtime, monitor the CODESYS download page for 4.24.0.0. The release is planned for December 2026 and is not available at the time of writing.
- For an embedded controller, open a support case with the device manufacturer. The manufacturer integrates the runtime into its firmware, so CODESYS cannot patch the device directly.
If you cannot upgrade yet, restrict the online service to trusted engineering systems:
- Put the controller and its engineering workstation on a segmented OT network.
- Allow the online-service port only from the engineering hosts that need it, and block it from office, guest and internet networks.
- Use a VPN with strong authentication for remote engineering access.
- Monitor connections to the online service and alert on connections from unexpected hosts.
The advisory calls these measures compensating controls, not a fix. They reduce who can reach the vulnerable parser, but they do not remove the out-of-bounds write. A controller that is reachable from an untrusted network remains exposed.
What is the root cause?
The root cause is an out-of-bounds write in the CmpChannelMgr and CmpChannelMgrEmbedded components, which handle CODESYS online-service packets without checking the declared length against the destination buffer.
CERT@VDE describes the fault in the same terms: the components perform improper length checking when handling online service packets, and a specially crafted packet causes an out-of-bounds write. CERT@VDE classifies it as CWE-787, an out-of-bounds write.
CODESYS does not publish the runtime source or a patch diff. The public record describes the fault at component level, and this section stays at that level rather than inventing a code path. The two components sit on the online-service path: CmpChannelMgr manages the channels that carry online-service traffic, and CmpChannelMgrEmbedded is the variant used in embedded builds. A length field in the request is trusted for a copy or an index, and a value larger than the buffer moves the write past its end.
The companion CVEs in the same advisory show the same pattern in other components. CmpSettings has an integer underflow on request lengths, CmpRedundancy and CmpAppBP miss authorization checks, and CmpOpenSSL misses a path-traversal check. The critical one is the channel manager, because it runs before authentication.
How is it exploited?
An attacker sends a crafted packet to the online service of an affected controller. The packet needs no account, token or user action.
- The attacker reaches the controller's online service over the network.
- The attacker sends a request whose declared length does not match the data that follows.
CmpChannelMgrorCmpChannelMgrEmbeddeduses the declared length in a copy or an index without checking it against the destination.- The write lands outside the intended buffer and corrupts adjacent memory.
- The attacker shapes the corrupted memory into code execution on the controller.
Limes Security demonstrated code execution on Windows, Linux and VxWorks runtimes and on a physical Schneider Electric Modicon M241 controller. The researchers say the exploit depends on the heap layout of the target and needed a different approach on each operating system. They are withholding the exploit details while affected products are updated, so no public proof of concept is available.
How does the attack flow?
An unauthenticated online-service packet reaches the channel manager, the missing length check turns it into an out-of-bounds write, and the attacker gains code execution on the controller.
What can an attacker do?
An attacker can run code on the controller with the runtime's privileges and control the physical process it drives. The impact includes changing setpoints and outputs, operating equipment outside its design limits, halting production, or altering a process subtly enough that operators do not notice.
On a soft PLC, the attacker also reaches a general-purpose operating system with network access, credentials and often a path into the engineering or office network. Limes Security says it established persistence on its lab devices that survives a restart and remains until the firmware is reflashed. That persistence also lets a compromised controller travel through integrators, maintenance providers, spare parts or machines shipped with the controller installed.
The conditions are the ones in "Am I affected?": an affected runtime, a reachable online service and, for the lead CVE, no credentials. The companion CVEs need different positions. Some need a low-privileged account, and some need an administrator account.
Exploiting the cybersecurity flaw does not necessarily defeat a certified safety function. CODESYS Safety SIL2 is in the first product group, so operators of safety-related systems should include the flaw in their risk assessment. Limes Security says it has not demonstrated that the flaw defeats a deployed safety function.
Why does the fix work?
The fix replaces the runtime with a build that validates online-service packet lengths before it uses them. The corrected build is 3.5.22.50 for the first product group.
CODESYS does not publish the patch diff, so the public record cannot show the exact lines that changed. The advisory says the vulnerable components perform improper length checking, and the fixed build is the vendor's corrected implementation. A correct check compares the declared length with the bytes actually received and with the size of the destination buffer, and rejects the request before any copy or index. That closes the out-of-bounds write for the channel-manager path.
The fix is complete only for the thirteen products that have 3.5.22.50. The other thirteen products have no fixed release yet, and their fix is planned for 4.24.0.0 in December 2026. Until that release ships, those products remain affected even after the Windows-based components are updated.
The Visualization flaws are fixed in 4.11.0.0. The Control companion CVEs ship in the same 3.5.22.50 and 4.24.0.0 builds as the lead flaw, and the Linux and QNX platform flaws are part of the 4.24.0.0 work.
How do I check if I was compromised?
CERT@VDE and Limes Security have not published indicators of compromise for CVE-2026-127148. These checks look for the effects of a compromise rather than a known signature.
Review connections to the controller's online service. A connection from a host that is not an engineering workstation is a lead. Capture or export the flows to a packet capture, then list the sources that reached TCP 11740 or 1217:
tcpdump -n -r ot-capture.pcap 'tcp port 11740 or tcp port 1217' |
awk '{print $3}' | cut -d. -f1-4 | sort | uniq -c | sort -nr
Compare the running application with the last approved project. An unexpected download, a changed program, or a new setpoint that nobody scheduled is a lead:
# Set CODESYS_DIR to the runtime's install directory from the manufacturer's documentation.
find "$CODESYS_DIR" -type f -printf '%p %s %TY-%Tm-%Td %TH:%TM\n' | sort > /tmp/codesys-files.txt
Check the controller's firmware and application integrity against the manufacturer's baseline. A controller that was reflashed or whose application was replaced outside a maintenance window deserves an investigation. Limes Security recommends integrity checks of the controller and its application as part of the response, because patching alone does not show what a controller executed.
A failed attempt may leave no trace. The online service may not log malformed packets, and a crash may be the only visible sign. Treat an unexplained controller restart, a communication fault or a process anomaly as a lead, not as proof.
Timeline
- 2026-07-07: Limes Security submits the PLC2SHELL report to CODESYS through CERT@VDE.
- 2026-10-29: The first CVE IDs are assigned.
- 2026-11-24: CERT@VDE publishes the Visualization advisory, VDE-2026-154, with the fix in 4.11.0.0.
- 2026-11-30: CERT@VDE publishes VDE-2026-169 and VDE-2026-170 for CODESYS Control, and 3.5.22.50 is available for the first product group.
- 2026-12-02: Limes Security publishes the PLC2SHELL research write-up.
- 2026-12-03: Limes Security publishes its internet exposure scan, which finds 1,094 confirmed CODESYS controllers reachable from the internet.
FAQ
Is CVE-2026-127148 exploited in the wild?
No exploitation is reported. CISA's SSVC entry for the CVE lists exploitation as none on 2026-11-30, and the CVE is not in CISA KEV as of 2026-12-03. Limes Security demonstrated code execution in its lab and is withholding the exploit details.
Does every CODESYS-based controller need a patch?
Every controller that runs an affected runtime needs a fixed runtime. Thirteen products have 3.5.22.50 now. The other thirteen need 4.24.0.0, which is planned for December 2026. For an embedded controller, the device manufacturer must ship the fixed runtime in its firmware.
Is the Linux runtime fixed?
Not yet. The Linux, ARM, PFC, PLCnext, WAGO and Raspberry Pi products are in the second group, and their fixed version is 4.24.0.0. Until it ships, network segmentation and access restrictions are the only mitigations.
Can I block the online-service port and consider the controller fixed?
Blocking the port reduces exposure, but it is not a fix. The controller still runs the vulnerable code, and any path that reaches the online service, including a maintenance laptop or a flat OT network, can trigger the flaw. Upgrade when a fixed runtime is available.
Does the flaw defeat a certified safety function?
Exploiting the cybersecurity flaw does not necessarily compromise the safety function itself. CODESYS Safety SIL2 is in the affected product group, and Limes Security says it has not demonstrated that the flaw defeats a deployed safety function. Operators of safety-related systems should still include the flaw in their risk assessment.
Is there a public proof of concept?
No. Limes Security says it developed a reliable exploit for Windows, Linux and VxWorks, but it is withholding the details while affected products are updated. No public exploit code is linked in the CERT@VDE advisory or the research write-up.
References
- CERT@VDE advisory VDE-2026-169, CODESYS Control, published 2026-11-30: https://www.certvde.com/en/advisories/VDE-2026-169/ (checked December 3, 2026)
- CERT@VDE advisory VDE-2026-170, CODESYS Control Linux/QNX platform, published 2026-11-30: https://www.certvde.com/en/advisories/VDE-2026-170/ (checked December 3, 2026)
- CERT@VDE advisory VDE-2026-154, CODESYS Visualization, published 2026-11-24: https://www.certvde.com/en/advisories/VDE-2026-154/ (checked December 3, 2026)
- CVE-2026-127148 record, including the CISA ADP SSVC entry that lists exploitation as none on 2026-11-30: https://www.cve.org/CVERecord?id=CVE-2026-127148 (checked December 3, 2026)
- Limes Security, PLC2Shell: Pre-Auth RCE in CODESYS Control Runtime, published 2026-12-02: https://plc2shell.com/en/plc2shell-vulnerability/ (checked December 3, 2026)
- Limes Security, PLC2Shell internet exposure scan, scanned 2026-12-03: https://plc2shell.com/en/plc2shell-vulnerability/internet-exposure/ (checked December 3, 2026)
- CODESYS downloads and updates: https://www.codesys.com/download/ (checked December 3, 2026)
- CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (catalog 2026.11.30, checked December 3, 2026)
Keep reading
