Security Advisory

CVE-2021-29242: CODESYS Router Packet Re-Routing

Last updated:
  • CVE-2021-29242

CVE-2021-29242 is an input validation flaw in the CODESYS V3 router: crafted packets sent without login change its addressing scheme and let an attacker re-route, add, remove or change PLC communication. NVD scores it 7.3, CODESYS 8.3. CODESYS fixed it in V3.5.17.0 and V4.1.0.0; ctrlX CORE PLC App 01V10 fixes it, IndraMotion MLC, MLD and MTX have no fix.

Need to know whether your firmware ships an affected version? Get a firmware scan report or contact us.

How severe is CVE-2021-29242?

CVSS base score

7.3

High severity

EPSS score (FIRST)

1.3%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2021-29242 · Source: NVD

CVSS v3.1 severity rating scale: None 0.0, Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9, Critical 9.0 to 10.0
How a CVSS v3.1 base score maps to a severity rating. Source: FIRST CVSS v3.1 specification, section 5.

Which products and versions does CVE-2021-29242 affect?

ComponentCPEVersion range
CODESYS V3 products with CmpRouter or CmpChannelServer (Control RTE, Control Win, Gateway, HMI, OPC Server, PLCHandler, Safety SIL2, toolkits)cpe:2.3:a:codesys:gateway:*:*:*:*:*:*:*:*before V3.5.17.0; fixed in V3.5.17.0 (CODESYS advisory 2021-01)
CODESYS Control for BeagleBone, emPC-A/iMX6, IOT2000, Linux, Linux ARM, PLCnext, PFC100, PFC200, Raspberry Pi, WAGO Touch Panels 600; Edge Gateway for Linuxcpe:2.3:a:codesys:control_for_linux_sl:*:*:*:*:*:*:*:*before V4.1.0.0; fixed in V4.1.0.0
Bosch Rexroth IndraMotion MLC, MLD, MTX—all versions; no firmware fix, ctrlX CORE as security gateway or replacement (BOSCH-SA-350374)
Bosch Rexroth ctrlX CORE PLC App—up to 01V08; fixed in 01V10 (BOSCH-SA-350374)

What does CVE-2021-29242 mean for affected devices?

The CVE record, assigned by MITRE, reads: "CODESYS Control Runtime system before 3.5.17.0 has improper input validation. Attackers can send crafted communication packets to change the router's addressing scheme and may re-route, add, remove or change low level communication packages." The "router" here is not a network router but the CODESYS router component, which forwards CODESYS protocol traffic between clients such as the Development System, HMIs, OPC servers and PLCHandler and the PLC runtime. The record was published on 2021-05-03 (NVD, CVE.org record).

How severe is it?

The CVE record carries no CNA score. NVD's Primary score is CVSS v3.1 7.3, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L, with a CVSS v2 score of 7.5 and weakness CWE-20, improper input validation. Bosch uses the same 7.3 vector. CODESYS rates it higher in its own advisory: CVSS v3.0 8.3, CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L, with a changed scope. All three agree that no login and no user action are needed.

Which CODESYS versions fix it?

CODESYS Security Advisory 2021-01, version 3.0 of 2021-05-18, covers all CODESYS V3 products that contain the CmpChannelServer, CmpChannelServerEmbedded, CmpRouter or CmpRouterEmbedded component:

Product group Affected Fixed
Control RTE V3 (incl. for Beckhoff CX), Control Win V3, runtime and visu toolkits, Safety SIL2, Edge Gateway for Windows, Gateway V3, HMI V3, OPC Server V3, PLCHandler SDK, Simulation Runtime before V3.5.17.0 V3.5.17.0
Control for BeagleBone, emPC-A/iMX6, IOT2000, Linux, Linux ARM, PLCnext, PFC100, PFC200, Raspberry Pi, WAGO Touch Panels 600; Edge Gateway for Linux before V4.1.0.0 V4.1.0.0

NVD's 24 CPE entries follow the same split. CODESYS also hardened the router overall in this release and warns that updating, "in particular the CODESYS Gateway", may give controllers new CODESYS addresses; clients configured by node name, hostname or IP address find their controllers again, while clients set to fixed CODESYS addresses may need reconfiguring. Alexander Nochvay of Kaspersky Lab ICS CERT and the CODESYS security team found the flaw.

How are Bosch Rexroth controllers affected?

Bosch PSIRT advisory BOSCH-SA-350374, published 2021-05-19, lists Rexroth IndraMotion MLC, MLD and MTX in all versions and the ctrlX CORE PLC App up to 01V08. Bosch spells out the impact per product. On the ctrlX CORE PLC runtime an attacker might hide the origin of their address or briefly interrupt communication; "no authentication bypass is possible" and a restart of the PLC runtime restores it. On IndraMotion MLC, MTX and MLD an attacker might act as a man in the middle and manipulate requests between the runtime and its clients, in the worst case manipulating the PLC runtime or reading data without authorization.

Bosch's fix for ctrlX CORE is PLC App 01V10, which includes the corrected CODESYS stack. For IndraMotion MLC, MTX and MLD there is no firmware fix; the options are a ctrlX CORE as security gateway in front of the controller or a ctrlX CORE in its place, plus the network segmentation in Bosch's Security Guideline Electric Drives and Controls.

What should asset owners do?

Update CODESYS runtimes and gateways to V3.5.17.0 or V4.1.0.0 or later, and plan for the address change on gateways and HMIs. On ctrlX CORE, run PLC App 01V10 or later. Put IndraMotion controllers behind a gateway that allows the CODESYS protocol only from named engineering stations and HMIs, because the man-in-the-middle impact Bosch describes matters most there.

The Bosch Rexroth ctrlX, IndraDrive and Nexo guide covers the CODESYS flaws in Rexroth controllers, including the later channel ID flaw CVE-2022-22517. CVE-2019-9010 is an earlier CODESYS gateway flaw, and the CODESYS runtime vulnerability guide explains the components.

Is it exploited?

CODESYS knew of no public exploit when it published the advisory. CVE-2021-29242 is not in the CISA KEV catalog as of 2026-12-04 (catalog version 2026.12.04, 1,814 entries). FIRST EPSS gives it 0.01324, the 71.9th percentile, in the 2026-12-04 dataset (CISA KEV, FIRST EPSS).

Three signals on every advisory: CVSS says how severe the flaw is, EPSS gives the probability of exploitation in the wild in the next 30 days, and a CISA KEV listing means the flaw has been exploited in the wild
CVSS rates severity, EPSS estimates the likelihood of exploitation, and CISA KEV records exploitation seen in the wild. Source: FIRST EPSS; CISA KEV catalog.

How do the CVSS, EPSS and KEV signals for CVE-2021-29242 compare?

CVE-2021-29242 signals as recorded on this page, last checked .
SignalValue for CVE-2021-29242SourceWhat it tells you
CVSS base score7.3 (High)NVDHow severe the flaw is in its worst case, from 0.0 to 10.0; it says nothing about whether anyone is exploiting it.
EPSS probability1.3%FIRST EPSSThe probability that the CVE is exploited in the wild in the next 30 days.
CISA KEV listingNot listed as of 2026-12-04CISA KEV catalogA listing means CISA has reliable evidence of exploitation in the wild; BOD 22-01 sets a remediation due date for US federal civilian agencies.
Published2021-05-03NVDThe date the CVE record was first published in NVD.

How does the CVE-2021-29242 score change on your network?

A CVSS base score assumes the worst-case exposure. If the vulnerable interface on your device is reachable only from a local segment, or an attacker needs an account first, change those metrics below to see the re-scored base value. The FIRST CVSS v3.1 specification puts deployment-specific scoring in the Environmental metric group, so treat this as a quick what-if, not a replacement score.

Starting vector (matches the CVSS score above): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Quoted vector: 7.3 (High)

Your re-score: 7.3 (High)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.
From advisory to verified fix in four steps: read the advisory, find the affected component in the firmware SBOM, apply the fixed version or vendor mitigation, then re-scan the image to confirm the vulnerable version is gone
Read the advisory, find the component in your firmware SBOM, apply the fix, then re-scan to confirm it.

How do you check CVE-2021-29242 status from the command line?

These commands re-read the three public signals for CVE-2021-29242 (NVD, FIRST EPSS and the CISA KEV feed) so a build pipeline or a ticket can record the current values. They need curl and jq.

# NVD: CVSS metrics and record status (no API key: at most 5 requests per 30 s)
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2021-29242" \
  | jq '.vulnerabilities[0].cve | {vulnStatus, metrics}'

# FIRST EPSS: today's exploitation probability and percentile
curl -s "https://api.first.org/data/v1/epss?cve=CVE-2021-29242" | jq '.data[0]'

# CISA KEV: prints the catalog entry, or nothing if the CVE is not listed
curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json \
  | jq --arg id CVE-2021-29242 '.vulnerabilities[] | select(.cveID == $id)'

Which sources back each CVE-2021-29242 claim?

  • NVD (read 2026-12-04): status Modified; Primary CVSS v3.1 7.3 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L and CVSS v2 7.5; no CNA score; CWE-20; 24 CODESYS CPEs from 3.0 before 3.5.17.0 or 4.1.0.0. — NVD
  • CODESYS Advisory 2021-01 v3.0 (2021-05-18): CmpChannelServer/CmpRouter components before V3.5.17.0 / V4.1.0.0; CVSS v3.0 8.3 S:C; router hardened, CODESYS addresses may change; no known public exploits; found by Alexander Nochvay (Kaspersky Lab ICS CERT) and CODESYS security team. — CODESYS
  • BOSCH-SA-350374 (2021-05-19): IndraMotion MLC, MLD, MTX all versions, ctrlX CORE PLC App <= 01V08, fix 01V10; per-product impact (ctrlX: no authentication bypass, restart restores; IndraMotion: man in the middle); score 7.3. — Bosch PSIRT
  • CVE.org record: state PUBLISHED, assigner MITRE, published 2021-05-03, no CNA metrics. — CVE.org
  • Not in CISA KEV, catalog version 2026.12.04, 1,814 entries, checked 2026-12-04. — CISA KEV
  • EPSS 0.01324, percentile 0.71905, dataset 2026-12-04. — FIRST EPSS

Is your firmware affected by CVE-2021-29242?

Advisories in the same weakness class as CVE-2021-29242

Sources for CVE-2021-29242

  1. NVD
  2. CODESYS Security Advisory 2021-01 (PDF)
  3. Bosch PSIRT BOSCH-SA-350374: CODESYS routing flaw in Rexroth controllers
  4. CVE.org record CVE-2021-29242 (JSON)
  5. CISA KEV
  6. FIRST EPSS

CVE-2021-29242: frequently asked questions

What is the CODESYS router in CVE-2021-29242?

It is the CODESYS component that forwards CODESYS protocol traffic between clients, such as the Development System, HMIs, OPC servers and PLCHandler, and the PLC runtime. CODESYS advisory 2021-01 names the CmpRouter, CmpRouterEmbedded, CmpChannelServer and CmpChannelServerEmbedded components. It is not an IP network router.

Will updating CODESYS change my network setup?

Possibly. CODESYS says the fixed release hardens the router and that updating, in particular the CODESYS Gateway, may give controllers new CODESYS addresses. Clients configured by node name, hostname or IP address reconnect normally; clients using fixed CODESYS addresses may need to be reconfigured.

Which Bosch Rexroth products have a fix?

Only ctrlX CORE: BOSCH-SA-350374 names PLC App 01V10 as the fix for versions up to 01V08. IndraMotion MLC, MLD and MTX are affected in all versions with no firmware fix; Bosch offers a ctrlX CORE as security gateway or as a replacement, plus network segmentation.

Why are there three different scores?

MITRE, the CNA, published no score. NVD and Bosch give CVSS v3.1 7.3 with unchanged scope. CODESYS gives CVSS v3.0 8.3 with a changed scope. All agree on network access with no privileges or user interaction. The CVE is not in CISA KEV as of 2026-12-04; EPSS is 0.01324 in the 2026-12-04 dataset.