Skip to content
Exploit for CVE-2026-127148

Exploit for CVE-2026-127148

Sploitus • December 4, 2026

Pre-authentication remote code execution in CODESYS Control Runtime through an out-of-bounds write in the CmpChannelMgr component.

The CODESYS Control Runtime powers over 10 million PLC controllers worldwide. Vendors including Schneider Electric, WAGO, ABB, Beckhoff, Festo, and Bosch Rexroth ship controllers that embed this runtime.

CVE-2026-127148 is a heap-based out-of-bounds write in the CmpChannelMgr and CmpChannelMgrEmbedded components. It targets the Layer 4 transport protocol handler on TCP port 11740 (online services). No authentication is required. CVSS 9.8.

The advisory VDE-2026-169 / CODESYS Security Advisory 2026-17 bundles this vulnerability with four additional CVEs affecting authenticated endpoints. PLC2Shell targets the pre-auth entry point, which is the most critical one.

The CODESYS online services protocol uses a Layer 4 transport that splits messages into blocks. Each block carries a sequence number. When a block arrives out of order, the runtime stores it at a computed offset:

write_offset = (block_nr - last_recv - 1) * max_payload + current_write_pos

The function responsible is `FUN_08251200` in the monolithic runtime binary (2900 bytes, L4Base data handler). It was recovered by dumping decrypted memory from the running process. The `.text` section is encrypted at rest by Wibu CodeMeter AxProtector and mapped RWX at runtime.

The bounds validation has a logic flaw at offset `+0x1098` in this function:

// Decompiled from codesyscontrol.bin 3.5.19.10 (memory dump)

// FUN_08251200 - L4Base-StoreOutOfOrderData path

if ((pkt_size == max_block_size) || (payload_size == buffer_remaining))

goto do_memcpy; // bounds check bypassed entirely

// This check is only reached when BOTH conditions are false

if (payload_size + write_offset > comm_buffer_size) {

log_error("data exceeds the channel buffer");

memcpy(channel_buffer + write_offset, packet_data, payload_size);

The first condition checks whether the incoming packet fills the entire block. When the attacker crafts a packet whose total size equals the negotiated `max_block_size` (default `0x2000`), the condition evaluates to true. Execution jumps straight to `memcpy`, bypassing the buffer boundary check.

The attacker controls `block_nr` through the L4 packet header. A high block number pushes `write_offset` past the channel buffer boundary. The `memcpy` at offset `+0x10FC` writes attacker-controlled data to an arbitrary heap location.

There are no stack canaries in the binary (zero `__stack_chk_fail` references). The heap allocator metadata sits adjacent to channel buffers. Corrupting it redirects execution on the allocation or free.

- **Denial of service**: corrupts heap metadata, crashes the PLC runtime

- **Arbitrary write primitive**: controlled offset and payload content

- **Remote code execution**: heap shaping redirects execution on alloc/free

- **No stack canary**: the runtime binary contains zero `__stack_chk_fail` references

- **No authentication**: the channel open and data block paths are reachable without login

- **Code signing**: the binary uses Wibu CodeMeter for code protection, but this does not prevent runtime exploitation

Non-destructive scanner that identifies vulnerable CODESYS instances without sending exploit packets. Safe to run against production PLCs.

python3 safechecker.py 10.0.0.1 10.0.0.2 192.168.1.0/24 -o report.json

python3 safechecker.py --port 11740 --timeout 3 --threads 20

1. Online services handshake (magic `0xC55C` validation)

2. Version string extraction from runtime response

3. Version comparison against known patch thresholds

4. Channel negotiation probe to confirm pre-auth reachability

5. Multi-threaded scanning with CIDR expansion

Output includes per-host status (VULNERABLE / PATCHED / UNKNOWN) and optional JSON report for integration with asset management tools.

The exploit targets the CODESYS online services protocol on TCP port 11740:

+--------+--------+-----------+----------+------------+

| Magic | Type | Header Sz | Body Sz | Service |

| 0xC55C | 0x01 | 12 | variable | Group + ID |

+--------+--------+-----------+----------+------------+

+------+-------+------------+----------+---------+---------+

| Type | Flags | Channel ID | Block Nr | Ack Nr | Payload |

| 1B | 1B | 2B | 4B | 4B | ... |

+------+-------+------------+----------+---------+---------+

1. Open a channel through the online services negotiation (service group `0x40`, ID `0x0001`)

2. Send an initial data block with `PTF_FIRSTPACKAGE` flag to initialize message tracking

3. Send an out-of-order block where `total_size == max_block_size` and `block_nr` is high

4. The runtime computes the write offset from `block_nr`, skips the bounds check, and calls `memcpy` past the buffer

The vulnerability was confirmed through reverse engineering of `codesyscontrol.bin` version 3.5.19.10 extracted from a Hilscher netIOT Edge container. The `.text` section is encrypted at rest by Wibu CodeMeter AxProtector. The code was recovered by dumping decrypted memory from `/proc/PID/mem` while the runtime was active.

| Binary | codesyscontrol.bin (ELF x86-64, PIE, stripped) |

| Stack canary | None (0 `__stack_chk_fail` refs) |

| Code protection | Wibu CodeMeter AxProtector (RWX .text at runtime) |

| Vuln function | FUN_08251200 (L4Base handler, 2900 bytes) |

| Component | CmpChannelMgr, registered via `.data.rel.ro` relocs |

| Bounds bypass | Offset +0x1098 in L4Base handler |

| OOB memcpy | Offset +0x10FC in L4Base handler |

Advisory VDE-2026-169 covers five vulnerabilities. The four additional CVEs require authentication and score lower:

| CVE-2026-127148 | CmpChannelMgr | None | 9.8 |

| CVE-2026-127149 | CmpAppBP | Required | 8.1 |

| CVE-2026-127150 | CmpAppForce | Required | 8.1 |

| CVE-2026-127151 | CmpMonitor | Required | 8.1 |

| CVE-2026-127152 | CmpTraceMgr | Required | 8.1 |

PLC2Shell targets the pre-auth entry point (CVE-2026-127148). The authenticated vulnerabilities affect breakpoint, force, monitor, and trace manager components.

- [CODESYS Advisory 2026-17]( - Vendor advisory

- [CERT@VDE VDE-2026-169]( - Coordination

- [NVD CVE-2026-127148](

- [Limes Security]( - Original discovery

- [ICS-CERT]( - CISA advisory

- [CODESYS Online Help]( - Protocol documentation

This tool is provided for authorized security testing and research only. Do not use against systems you do not own or have explicit permission to test. Industrial control systems are safety-critical infrastructure. Unauthorized access to PLC controllers can cause physical harm.

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.