Act nowDisclosed

Advisory · CVE-2026-127071

Unauthenticated remote code execution in CODESYS Control web server via crafted WebSocket frames

A use-after-free flaw in the WebSocket handling of the CODESYS Control web server lets an unauthenticated remote attacker send crafted WebSocket frames that access a previously released connection object, which can lead to remote code execution. Scored CVSS 4.0 9.2 and CVSS 3.1 8.1. Fixed in 3.5.22.50, with 4.24.0.0 for the Linux-family products.

Vendor
CODESYS
Product
CODESYS Control
Identifier / CWE
CVE-2026-127071
CWE-416
Action timing
Immediate
ELI5

Explain it like I’m five

The web server inside a CODESYS controller keeps a note for each live web connection. A flaw lets a stranger send a rigged web message that frees that note while the server is still using it, and then reuse the freed space to smuggle in their own instructions and take over the controller.

SIMPLIFIED_ATTACK_PATH05 STEPS
  1. 01Reach the web server

    The attacker reaches the web server component of an affected CODESYS Control runtime.

  2. 02Crafted WebSocket frames

    The attacker sends specially crafted WebSocket frames to the server.

  3. 03Connection object freed

    The frames trigger access to a connection object that has already been released.

  4. 04Freed memory reused

    The attacker reuses the freed object; successful exploitation requires prior knowledge of the runtime process memory layout.

  5. 05Code runs on the controller

    The use-after-free is leveraged into remote code execution in the runtime process, with no authentication required.

What happened

The CODESYS Control runtime contains a use-after-free vulnerability in the WebSocket handling of its web server component. An unauthenticated remote attacker can send specially crafted WebSocket frames that trigger access to a previously released connection object. Successful exploitation may result in remote code execution if the attacker has previously obtained sufficient information about the memory layout of the runtime process on the targeted device. The vulnerability is rated CVSS 4.0 9.2 and CVSS 3.1 8.1, and NVD references the CERT@VDE advisory VDE-2026-116 as the vendor bulletin; that advisory page had not yet been published on the CERT@VDE site at the time of writing.

Affected are CODESYS Control RTE (SL), Control RTE for Beckhoff CX (SL), Control Win (SL), HMI (SL), and Runtime Toolkit in versions from 3.5.22.0 up to but not including 3.5.22.50, and the Linux-family products (BeagleBone, emPC-A/iMX6, IOT2000, Linux ARM, Linux, PFC100, PFC200, PLCnext, Raspberry Pi, WAGO Touch Panels 600, Virtual Control) in versions from 4.21.0.0 up to but not including 4.24.0.0. The fixed versions follow the same patch train as the sibling CODESYS advisories published the same day: 3.5.22.50 for the 3.5 line, available now, and 4.24.0.0 for the Linux-family products, planned for December 2026.

What to do

  1. Inventory every CODESYS-based controller, runtime, and HMI in the estate and record the Control version on each.
  2. Update the 3.5 line products to version 3.5.22.50 using the CODESYS Installer or the CODESYS Store.
  3. For Linux-family products awaiting 4.24.0.0, restrict network access to the CODESYS web server and online protocol services with firewalls and segmentation, allowing connections only from trusted systems.
  4. Do not expose CODESYS web or online protocol services to untrusted networks or the internet; where remote access is required, use a secure VPN with strong authentication.
  5. Review web server and controller logs for unusual WebSocket traffic, unexpected connection churn, or crashes in the runtime process.
  6. Plan the 4.24.0.0 upgrade for December 2026 and verify the deployed runtime version on every device after updating.

Management note

The score split tells the story: NVD rates this 8.1 on CVSS 3.1 because exploitation needs memory-layout knowledge, while the CVSS 4.0 score of 9.2 reflects what happens once that condition is met, unauthenticated code execution on a controller. Treat it as critical, patch the 3.5 line now, and isolate the Linux-family products until their December release.