CVE-2021-3156, called Baron Samedit, is a heap buffer overflow in sudo before 1.9.5p2 that lets any local user become root. Bosch PSIRT advisory BOSCH-SA-372917 lists ctrlX CORE Runtime before XCR-V-0108 and the Rexroth IoT Gateway on IndraControl PR21 as affected. NVD scores it 7.8, and it has been in CISA KEV since 2022-04-06.
Need to know whether your firmware ships an affected version? Get a firmware scan report or contact us.
How severe is CVE-2021-3156?
CVSS base score
7.8
High severity
EPSS score (FIRST)
100.0%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
Yes
Listed as known exploited
Published
Vulnerability ID: CVE-2021-3156 · Source: NVD

Which products and versions does CVE-2021-3156 affect?
| Component | CPE | Version range |
|---|---|---|
| Bosch Rexroth ctrlX CORE Runtime | — | before XCR-V-0108; fixed in ctrlX CORE V0108 (Bosch PSIRT BOSCH-SA-372917) |
| Rexroth IoT Gateway on IndraControl PR21 (PR2100.1-*-IOTNN variants) | — | versions shipped with sudo before 1.9.5p2; no fixed version named in BOSCH-SA-372917, compensating measures apply |
| sudo | cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:* | 1.8.2 to before 1.8.32, 1.9.0 to before 1.9.5, 1.9.5 and 1.9.5p1 per NVD; sudo project lists 1.7.7 to 1.7.10p9, 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1; fixed in 1.9.5p2 |
What does CVE-2021-3156 mean for affected devices?
NVD describes CVE-2021-3156 as an off-by-one error in sudo before 1.9.5p2 "that can result in a heap-based buffer overflow, which allows privilege escalation to root". NVD's Primary score is CVSS v3.1 7.8 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) with a CVSS v2 score of 7.2; CISA-ADP gives the same 7.8. NVD assigns CWE-193, off-by-one error, and its CPEs cover sudo 1.8.2 to before 1.8.32 and 1.9.0 through 1.9.5p1. The record was assigned by MITRE and published on 2021-01-26 (NVD, CVE.org record). The sudo project advisory lists 1.7.7 through 1.7.10p9, 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1 as affected, says the user does not have to be listed in the sudoers file, and fixes it in 1.9.5p2.
Which Bosch Rexroth products ship the vulnerable sudo?
Bosch PSIRT advisory BOSCH-SA-372917, published 2021-02-24, covers this sudo flaw together with two Linux kernel privilege escalation flaws, CVE-2020-29661 and CVE-2021-3347, all scored 7.8 by Bosch:
| Product | Affected | Fix |
|---|---|---|
| ctrlX CORE Runtime | before XCR-V-0108 | ctrlX CORE V0108, with updated kernel and sudo |
| Rexroth IoT Gateway on IndraControl PR21 (PR2100.1-*-IOTNN variants) | shipped versions | no fixed version named; compensating measures |
Bosch states that exploiting any of the three flaws needs a user account plus access through the serial console or SSH. Bosch's advisory gives CWE-787 for the sudo flaw, where NVD gives CWE-193.
What should ctrlX CORE and IoT Gateway owners do?
Update ctrlX CORE to V0108 or later, through a sales partner or the online update channel for connected devices. Bosch notes that SSH is a debug interface that is disabled by default on ctrlX CORE and that only members of the "sshuser" group may log in over SSH; leave SSH off, enable it only temporarily, and keep that group small. The serial console needs the housing opened, so physical access control also counts. On the IoT Gateway the single default account already has superuser rights, so Bosch asks owners to change the default password, keep it secret and segment the network as its Security Guideline Electric Drives and Controls describes.
The Bosch Rexroth ctrlX, IndraDrive and Nexo guide puts this flaw next to the other 28 CVEs Bosch reports for Rexroth products, including the KEV-listed CVE-2019-0708 on Rexroth industrial PCs and CVE-2021-44228 in the IoT Gateway. CVE-2021-4034, PwnKit in polkit, is a comparable local root flaw in Linux userland, and the Linux kernel CVE guide covers the kernel side of BOSCH-SA-372917.
CVE-2021-3156 has been in the CISA KEV catalog since 2022-04-06 and is still listed as of 2026-12-04 (catalog version 2026.12.03, 1,811 entries); CISA's required action is to apply updates per vendor instructions. FIRST EPSS gives it 0.99962, the 99.974th percentile, in the 2026-12-03 dataset (CISA KEV, FIRST EPSS).

How do the CVSS, EPSS and KEV signals for CVE-2021-3156 compare?
| Signal | Value for CVE-2021-3156 | Source | What it tells you |
|---|---|---|---|
| CVSS base score | 7.8 (High) | NVD | How severe the flaw is in its worst case, from 0.0 to 10.0; it says nothing about whether anyone is exploiting it. |
| EPSS probability | 100.0% | FIRST EPSS | The probability that the CVE is exploited in the wild in the next 30 days. |
| CISA KEV listing | Listed | CISA KEV catalog | A listing means CISA has reliable evidence of exploitation in the wild; BOD 22-01 sets a remediation due date for US federal civilian agencies. |
| Published | 2021-01-26 | NVD | The date the CVE record was first published in NVD. |
How does the CVE-2021-3156 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:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Quoted vector: 7.8 (High)
Your re-score: 7.8 (High)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

How do you check CVE-2021-3156 status from the command line?
These commands re-read the three public signals for CVE-2021-3156 (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-3156" \
| 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-3156" | 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-3156 '.vulnerabilities[] | select(.cveID == $id)'Which sources back each CVE-2021-3156 claim?
- NVD (read 2026-12-04): status Analyzed; published 2021-01-26; Primary CVSS v3.1 7.8 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, CVSS v2 7.2; CISA-ADP 7.8; CWE-193; sudo CPE 1.8.2 to <1.8.32, 1.9.0 to <1.9.5, 1.9.5, 1.9.5p1. — NVD
- BOSCH-SA-372917 (published 2021-02-24): ctrlX CORE Runtime < XCR-V-0108 and IoT Gateway on IndraControl PR21 PR2100.1-*-IOTNN; with CVE-2020-29661 and CVE-2021-3347, all 7.8; fix in ctrlX CORE V0108; SSH disabled by default, sshuser group; IoT Gateway change default password; CWE-787. — Bosch PSIRT
- sudo advisory (2021-01-26): affected 1.7.7-1.7.10p9, 1.8.2-1.8.31p2, 1.9.0-1.9.5p1; user need not be in sudoers; fixed in 1.9.5p2. — sudo project
- CVE.org record: state PUBLISHED, assigner MITRE, published 2021-01-26. — CVE.org
- In CISA KEV since 2022-04-06, ransomware use Unknown; catalog version 2026.12.03, 1,811 entries, checked 2026-12-04. EPSS 0.99962, percentile 0.99974, dataset 2026-12-03. — CISA KEV, FIRST EPSS

Advisories in the same weakness class as CVE-2021-3156
Sources for CVE-2021-3156
CVE-2021-3156: frequently asked questions
Which ctrlX CORE version fixes CVE-2021-3156?
Bosch advisory BOSCH-SA-372917 lists ctrlX CORE Runtime before XCR-V-0108 as affected and names the ctrlX CORE V0108 release as the one with updated kernel and sudo packages. Owners get it from their sales partner, or through the online update channel if the device is connected to the update servers or managed remotely.
Can an attacker use this flaw over the network?
Not by itself. It is a local privilege escalation: the attacker needs an account on the device and a way to run commands. On ctrlX CORE that means the serial console, which requires opening the housing, or SSH, which Bosch ships disabled and limits to the sshuser group. Keeping SSH off removes most of the exposure.
Is there a fix for the Rexroth IoT Gateway?
BOSCH-SA-372917 names no fixed IoT Gateway version. Its single account already has superuser rights, so Bosch asks owners to change the default password, keep it secret and apply the network segmentation measures in its Security Guideline Electric Drives and Controls. The same gateway is also affected by Log4Shell, CVE-2021-44228, under a separate advisory.
Why does Bosch list CWE-787 when NVD says CWE-193?
Both describe the same bug from different angles. NVD classifies the root cause, an off-by-one error (CWE-193), while Bosch classifies the result, an out-of-bounds write on the heap (CWE-787). CISA's KEV entry lists both CWE-122 and CWE-193. The fix and the 7.8 score are the same in every source.
Questions about this page?