Detect CODESYS Control CmpChannelMgr Online Service Pack Out-of-Bounds Write (CVE-2026-127148) in Sumo Logic CSE
Detects potential exploitation of CVE-2026-127148, an improper length check (CWE-787, out-of-bounds write) in the CmpChannelMgr and CmpChannelMgrEmbedded components of the CODESYS Control runtime system. When handling an online service pack (CODESYS online communication protocol, typically over TCP/UDP 1217/11740), a malformed length field can trigger an out-of-bounds write, leading to memory corruption, runtime crash, or potential remote code execution on the PLC/controller. CVSS 9.8 (network, no auth). Because the CODESYS protocol is a binary OT protocol rarely parsed natively by SIEMs, these queries focus on observable network behavior toward CODESYS runtime ports, runtime process crashes/restarts, anomalous payload sizes, and unexpected service-pack management channels from untrusted hosts. Tune to your OT network segmentation and known engineering workstations.
MITRE ATT&CK
- Tactic
- Impact Lateral Movement
Sumo Detection Query
// df00tech DF00-971adec7e4 · https://df00tech.com/detections/CVE-2026-127148 · licence: https://df00tech.com/detections/licence
_sourceCategory=*firewall* OR _sourceCategory=*netflow*
| where (dest_port = 1217 or dest_port = 11740) and (protocol = "tcp" or protocol = "udp")
| where !(src_ip in ("10.0.0.0"))
| sum(bytes_out) as total_out, count by src_ip, dest_ip, dest_port
| where total_out > 100000 or _count > 20
| sort by total_out desc Summarizes CODESYS runtime port traffic in Sumo Logic to detect oversized or excessive sessions consistent with CVE-2026-127148 exploitation attempts.
Data Sources
Required Tables
False Positives & Tuning
- Engineering IDE large program downloads
- Scheduled controller backups over CODESYS protocol
- Network discovery tooling on OT VLANs
Other platforms for CVE-2026-127148
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Oversized payload to CODESYS runtime port (lab PLC/simulator)
Expected signal: Firewall/flow and Zeek conn logs recording a large sent-bytes session from the test host to port 11740 on the lab controller.
- Test 2 High connection count to CODESYS ports
Expected signal: Multiple connection flows from the source host to port 1217 within a short window.
- Test 3 Simulated runtime crash correlation
Expected signal: Windows Service Control Manager events (7036/7040) and CODESYS runtime log entries showing the service stop/start.
Response Playbook
Triage
- Confirm the destination host runs a CODESYS Control runtime (CmpChannelMgr/CmpChannelMgrEmbedded) and determine its version against VDE-2026-169 affected ranges.
- Verify whether the source IP is a sanctioned engineering workstation or IDE host; if not, treat the oversized/anomalous online service-pack traffic as hostile.
- Inspect packet captures for the CODESYS online service-pack message and check whether its length field is inconsistent with the actual payload size (indicator of CWE-787 trigger).
- Check the controller for an unexpected runtime crash, watchdog reset, or restart coinciding with the alert timestamp.
Containment
- Block the offending source IP at the OT firewall / cell boundary and restrict CODESYS runtime ports (1217/11740) to authorized engineering hosts only.
- If the controller is unstable or evidence of memory corruption exists, failover to a redundant PLC or place the process in a safe state per the OT runbook before restarting the runtime.
- Apply the CODESYS runtime update referenced by VDE-2026-169 as soon as a maintenance window allows.
Evidence Collection
- Capture full packet traces of the suspect sessions to CODESYS runtime ports for the malformed length-field payload.
- Collect controller runtime logs, crash dumps, and watchdog/event records around the incident window.
- Preserve firewall/flow logs showing source, destination, byte counts and timestamps for the anomalous sessions.
Escalation Criteria
- !Escalate to OT incident response and plant operations if the controller crashed, reset, or entered an unexpected state.
- !Escalate to the CISO/vendor if evidence indicates remote code execution or if the source is an external/untrusted network.
Investigation Guide
Forensic Artifacts
- >
Controller runtime crash dumps and watchdog/reset event logs - >
Packet captures of the malformed CODESYS online service-pack message - >
OT firewall/flow records of the source-to-controller sessions
Tuning Guidance
Populate the engineering-workstation allowlist (codesys_engineering_hosts.csv / engineeringWorkstations) with all authorized CODESYS IDE and deployment hosts to suppress legitimate large program/service-pack downloads. Baseline normal session sizes to the runtime ports in your environment and adjust the byte and connection-count thresholds accordingly. Where CODESYS runs on Windows soft-PLCs, pair the network rules with endpoint runtime-crash monitoring for higher fidelity. If an OT-aware IDS (e.g., parsing the CODESYS protocol) is available, prefer its length-field anomaly alerts over the volumetric heuristics here.
Hunting Queries
Hunt for hosts sending unusually large volumes to CODESYS runtime ports across the OT estate.
// df00tech DF00-971adec7e4 · https://df00tech.com/detections/CVE-2026-127148 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where DestinationPort in (1217, 11740) | summarize sessions=count(), bytes=sum(toint(SentBytes)) by SourceIP, DestinationIP | where bytes > 100000 | order by bytes desc ``` df00tech DF00-971adec7e4 · https://df00tech.com/detections/CVE-2026-127148 · licence: https://df00tech.com/detections/licence ```
index=network (dest_port=1217 OR dest_port=11740) | stats sum(bytes_out) as bytes count as sessions by src_ip dest_ip | where bytes>100000 | sort - bytes Atomic Red Team Tests
Send an abnormally large TCP payload to a lab CODESYS runtime port to generate the oversized-session telemetry the detection keys on. Does NOT implement the actual exploit; use only against an isolated test controller or simulator.
Command
head -c 200000 /dev/urandom | timeout 5 nc -w 3 192.0.2.50 11740 || true Cleanup
echo 'No persistent artifacts; verify lab runtime is still responsive and restart simulator if needed.' Expected Telemetry
Firewall/flow and Zeek conn logs recording a large sent-bytes session from the test host to port 11740 on the lab controller.
Expected Detection
KQL/SPL volumetric rules fire on the >100KB session to the CODESYS runtime port from a non-allowlisted source.
Open many short-lived connections to the CODESYS runtime ports to exercise the connection-count threshold branch of the detection.
Command
for i in $(seq 1 30); do timeout 2 nc -z 192.0.2.50 1217; done Cleanup
echo 'Connections are transient; no cleanup required.' Expected Telemetry
Multiple connection flows from the source host to port 1217 within a short window.
Expected Detection
Rules fire on ConnCount > 20 to the CODESYS runtime port from a non-allowlisted source.
On a lab Windows soft-PLC, stop/restart the CODESYS Control service around the time of the network test to validate the crash-correlation triage step.
Command
Stop-Service -Name 'CODESYSControlService' -Force; Start-Sleep -Seconds 3; Start-Service -Name 'CODESYSControlService' Cleanup
Get-Service -Name 'CODESYSControlService' | Start-Service Expected Telemetry
Windows Service Control Manager events (7036/7040) and CODESYS runtime log entries showing the service stop/start.
Expected Detection
Triage correlation links a runtime restart to the anomalous network session within the alert window.