# Critical CODESYS Out-of-Bounds Write (CVE-2026-127148) Enables Unauthenticated Takeover of Industrial Controllers (PLC2SHELL)

> CVE-2026-127148 is a CVSS 9.8 out-of-bounds write (CWE-787) in the CODESYS CmpChannelMgr and CmpChannelMgrEmbedded components that parse online-service packets. An unauthenticated network attacker can send a crafted packet to execute arbitrary code on the controller. No in-the-wild exploitation or public exploit code is known; Limes Security researchers demonstrated lab code execution on Windows, Linux and VxWorks runtimes and on a Schneider Electric Modicon M241, and are withholding exploit details.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-03T17:51:34Z
- **Last updated:** 2026-12-04T10:29:57.833Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7414
- **ID:** TL-2026-7414
- **Severity:** CRITICAL (CVSS 9.8)
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 23
- **CVEs:** CVE-2026-127148, CVE-2026-127149, CVE-2026-127147, CVE-2026-127150, CVE-2026-127146, CVE-2026-127169, CVE-2026-127170

## Description

CVE-2026-127148 was published by CERT@VDE on 2026-11-30 in advisory VDE-2026-169 (CODESYS Control: Multiple Vulnerabilities). The CmpChannelMgr and CmpChannelMgrEmbedded components perform improper length checking when handling online service packets, which produces an out-of-bounds write (CWE-787). An unauthenticated remote attacker who can reach the controller's online services can send a crafted packet and execute arbitrary code. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8); CVSS 4.0 scores it 9.3. CISA's SSVC assessment (CISA-ADP) lists Exploitation: none, Automatable: yes, Technical Impact: total. The 30-day EPSS reported by a secondary source was 0.97%.

The flaw was found as part of the PLC2SHELL research by Felix Eberstaller (f0rw4rd, Limes Security / QuellSec), with Luca Borzacchiello (Nozomi Networks) also credited in the advisory. The project reported about 40 vulnerabilities in CODESYS Control Runtime, Visualization and engineering components; 11 CVEs have been published so far and about 30 further findings remain under coordinated disclosure. The report was submitted to CODESYS through CERT@VDE in July 2026. The researchers state they built a reliable exploit that works with ASLR enabled. Exploitation depended on heap layout and needed a different approach for Windows, Linux and VxWorks. On lab devices, post-exploitation persistence survived restarts and remained until the firmware was reflashed. Code execution was shown on Windows, Linux and VxWorks runtimes and on a physical Schneider Electric Modicon M241. All of this was lab work. Exploit details are withheld until patches are widely deployed. Whether the flaw can defeat a deployed safety function (CODESYS Safety SIL2) has not been demonstrated, although Safety SIL2 is listed as affected.

Twenty-six CODESYS products are affected. Thirteen Windows/toolkit/engineering products at 3.0.0.0 up to but not including 3.5.22.50 are fixed in 3.5.22.50, which is available. Thirteen Linux/embedded SL products at 3.5.0.0 up to but not including 4.24.0.0 are fixed in 4.24.0.0, which is planned for December 2026, so no fix existed at publication. In CODESYS Development System V3, the simulation runtime is affected. Many device makers (for example Beckhoff, WAGO, PLCnext, Schneider Electric) embed CODESYS runtimes in firmware, so operators may need to wait for vendor firmware updates.

The same disclosure batch includes related, lower-impact CVEs: in VDE-2026-169, CVE-2026-127149 (CWE-863, 7.1), CVE-2026-127147 (CWE-191, 6.5), CVE-2026-127150 (CWE-22, 5.5) and CVE-2026-127146 (CWE-863, 4.3), all requiring an authenticated account; in VDE-2026-154 (Visualization, fixed in 4.11.0.0), CVE-2026-121016/121017/121018 (8.8) and CVE-2026-121019 (3.3), where a tampered runtime or man-in-the-middle attacker can lead to code execution on the engineering workstation; and in VDE-2026-170 (Linux/QNX only), CVE-2026-127167 (7.2) and CVE-2026-127168 (4.3). The sources do not identify any threat actor, malware, C2 infrastructure or network IOCs. No BeaconBeagle lookup was applicable because there are no network IOCs. The IOC list below therefore records affected components, products and credited entities for exposure scoping and detection engineering, not attacker infrastructure.

Defensive priority: restrict the CODESYS online protocol services with firewalls and segmentation so only trusted engineering systems can reach them, never expose runtimes to untrusted networks or the Internet, and use VPNs with strong authentication for remote access. Monitor OT networks for CODESYS connections from unexpected systems. Patching alone may not reveal a prior compromise, so verify controller and application integrity.

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1203 Exploitation for Client Execution
- T0814 Denial of Service
- T0883 Internet Accessible Device
- T0866 Exploitation of Remote Services
- T0857 System Firmware
- T0813 Denial of Control
- T1210 Exploitation of Remote Services
- T0836 Modify Parameter
- T0831 Manipulation of Control
- T0832 Manipulation of View
- T0826 Loss of Availability
- T1499 Endpoint Denial of Service
- T0888 Remote System Information Discovery

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**CODESYS Online-Service Access from Non-Engineering Host (CVE-2026-127148 PLC2SHELL) — Exploitation** (`TL-2026-7414-SPL-001`)

Detects accepted firewall connections to CODESYS V3 online-service/gateway ports (TCP 1217, TCP 11740, UDP 1740-1743) from hosts outside the engineering-workstation allowlist. CVE-2026-127148 is a pre-auth out-of-bounds write (CWE-787) in CmpChannelMgr/CmpChannelMgrEmbedded reachable only through these online services, and vendor guidance is to monitor for CODESYS connections from unexpected systems. No exploit signature is public, so this behaviour-first detection is the primary exploitation tripwire.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1210
- **Data sources:** pan:traffic, fgt_traffic, cisco:asa, firewall
- **Severity:** high
- **Confidence:** high

### Splunk SPL

````spl
```CVE-2026-127148 PLC2SHELL TL-2026-7414: CODESYS online-service connections from hosts outside the engineering allowlist```
index=ot_network sourcetype IN ("pan:traffic","fgt_traffic","cisco:asa") dest_port IN (1217,11740,1740,1741,1742,1743) action IN ("allowed","allow","accept")
| where NOT cidrmatch("10.10.50.0/24", src_ip)
| stats count AS connections min(_time) AS first_seen max(_time) AS last_seen values(dest_port) AS ports dc(dest_ip) AS controllers values(dest_ip) AS controller_ips BY src_ip
| convert ctime(first_seen) ctime(last_seen)
````

### Microsoft KQL

```kql
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DestinationPort in (1217, 11740, 1740, 1741, 1742, 1743)
| where DeviceAction in~ ("allow", "allowed", "accept")
| where not(ipv4_is_in_range(SourceIP, "10.10.50.0/24"))
| summarize Connections = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Ports = make_set(DestinationPort), Controllers = dcount(DestinationIP) by SourceIP
| project SourceIP, Connections, Controllers, Ports, FirstSeen, LastSeen
```

### Sigma

```yaml
title: CODESYS Online Service Connection from Non-Engineering Host (CVE-2026-127148)
id: 7c1e5a42-3b8d-4f6e-9a21-5d0c8e7b1a01
status: experimental
description: Detects allowed firewall connections to CODESYS V3 online-service and gateway ports from hosts outside the engineering workstation range. CVE-2026-127148 (PLC2SHELL) is a pre-auth out-of-bounds write reachable via these services.
references:
    - https://certvde.com/en/advisories/VDE-2026-169/
    - https://plc2shell.com/en/plc2shell-vulnerability/
author: Threadlinqs Team
date: 2026/12/03
tags:
    - attack.initial-access
    - attack.t1190
    - attack.lateral-movement
    - attack.t1210
    - cve.2026.127148
logsource:
    category: firewall
detection:
    selection:
        dst_port:
            - 1217
            - 11740
            - 1740
            - 1741
            - 1742
            - 1743
    filter_engineering:
        src_ip|cidr: '10.10.50.0/24'
    condition: selection and not filter_engineering
falsepositives:
    - Engineering workstations, jump hosts or vendor remote-support systems not yet in the allowlist
    - Asset-discovery or OT monitoring platforms that poll CODESYS gateways
level: high
```

**Known false positives:**

- Engineering workstations, jump hosts or vendor remote-support systems not yet in the allowlist
- OT asset-discovery or monitoring platforms that poll CODESYS gateways and runtimes

**Tuning notes:** Replace 10.10.50.0/24 with your engineering-workstation subnets or an allowlist lookup. Confirm ports against your deployment (V3 gateway 1217, runtime 11740, discovery UDP 1740-1743) and adjust index/sourcetype to your firewall or OT network-monitor feed. Scope to PLC/controller subnets to reduce noise.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Inbound Connection to CODESYS Runtime Process from Non-Engineering Host (Endpoint Telemetry) — Exploitation (locked: unlock with TL Creds)
- CODESYS Linux Runtime Spawning Shell or Download Utility — Post-Exploitation (locked: unlock with TL Creds)
- CODESYS Port Fan-Out Across Multiple Controllers — Lateral Movement (locked: unlock with TL Creds)
- CODESYS Runtime Crash or Unexpected Restart (Failed or Unstable Exploitation) — Exploitation (locked: unlock with TL Creds)
- CODESYS Runtime Application or Config File Modified by Non-Runtime Process — Persistence (locked: unlock with TL Creds)
- CODESYS Runtime Loading DLL from User-Writable Path — Post-Exploitation Payload Injection (locked: unlock with TL Creds)
- CODESYS Windows Runtime Spawning Shell or LOLBin Child Process — Post-Exploitation (locked: unlock with TL Creds)
- CODESYS Runtime Initiating Outbound Connection to Non-Private Address — C2 (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Critical CODESYS Flaw Lets Hackers Take Over Industrial Controllers Without a Password](https://thehackernews.com/2026/12/critical-codesys-flaw-lets-hackers-take.html)
- [PLC2SHELL: CODESYS vulnerability research (Limes Security)](https://plc2shell.com/en/plc2shell-vulnerability/)
- [CERT@VDE VDE-2026-169: CODESYS Control: Multiple Vulnerabilities](https://certvde.com/en/advisories/VDE-2026-169/)
- [CERT@VDE VDE-2026-154: CODESYS Visualization vulnerabilities](https://certvde.com/en/advisories/VDE-2026-154/)
- [CERT@VDE VDE-2026-170: CODESYS Control for Linux/QNX vulnerabilities](https://certvde.com/en/advisories/VDE-2026-170/)
- [CVE-2026-127148 record (CIRCL Vulnerability-Lookup / GCVE)](https://vulnerability.circl.lu/vuln/CVE-2026-127148)
- [CVE-2026-127148: CODESYS Control RTE (SL) Buffer Overflow (SecurityOnline CVE Watchtower)](https://securityonline.info/cve-watchtower/cve-2026-127148/)
- [15 New CODESYS SDK Flaws Expose OT Environments (prior CODESYS V3 SDK research context)](https://thehackernews.com/2023/08/15-new-codesys-sdk-flaws-expose-ot.html)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7414
