Security Advisory

CVE-2021-42378: BusyBox awk getvar_i Use-After-Free

Last updated:
  • CVE-2021-42378

CVE-2021-42378 is a use-after-free in the getvar_i function of the BusyBox awk applet: a crafted awk pattern can crash it and possibly run code. NVD scores it 7.2 for BusyBox 1.16.0 through 1.33.1, and 1.34.0 fixes it. Siemens lists it for SCALANCE and RUGGEDCOM routers, SCALANCE W-700 access points and SINAMICS GH180 drives.

Vulnerability summary

CVSS base score

7.2

High severity

EPSS score (FIRST)

2.8%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

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

Affected components

ComponentCPEVersion range
BusyBox (awk applet, getvar_i)cpe:2.3:a:busybox:busybox:*:*:*:*:*:*:*:*1.16.0 through 1.33.1 (NVD CPE); fixed in 1.34.0 (19 August 2021)
Siemens RUGGEDCOM RM1224 and SCALANCE M-800 / S615 routers (M804PB, M812-1, M816-1, M826-2, M874-x, M876-x, MUM853-1, MUM856-1, S615, S615 EEC)—before V7.2; fixed in V7.2 (Siemens ProductCERT SSA-419740, CISA ICSA-23-075-01)
Siemens SCALANCE W-700 IEEE 802.11ax (WAM763-1, WAM766-1, WUM763-1, WUM766-1)—before V2.0; fixed in V2.0 (Siemens ProductCERT SSA-565386, CISA ICSA-23-080-07)
Siemens SINAMICS PERFECT HARMONY GH180 (integrated SCALANCE S615)—drives produced between Oct 2021 and May 2023 with an S615; update the S615 to V7.2 (Siemens ProductCERT SSA-942865, CISA ICSA-23-166-12)

What does this mean for affected devices?

CVE-2021-42378 is a use-after-free (CWE-416) in BusyBox's awk applet. NVD's description says it "leads to denial of service and possibly code execution when processing a crafted awk pattern in the getvar_i function". NVD scores it 7.2 (high), vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H, and lists BusyBox 1.16.0 through 1.33.1 as affected (NVD).

It belongs to the set of 14 BusyBox CVEs that Claroty's Team82 and JFrog published on 9 November 2021, all fixed in BusyBox 1.34.0, released 19 August 2021. The Claroty write-up gives the condition for this one: it "applies if the attacker can supply an arbitrary pattern to awk". It also notes that awk is built by the default BusyBox configuration and shipped in Ubuntu's default BusyBox binary. The JFrog post lists awk 1.16 to 1.33.1 as affected and scores it 6.6.

Siemens names the devices in three advisories. SSA-419740 (2023-03-14, CISA ICSA-23-075-01) covers the RUGGEDCOM RM1224 LTE(4G) and the SCALANCE M804PB, M812-1, M816-1, M826-2, M874-2, M874-3, M876-3, M876-4, MUM853-1, MUM856-1, S615 and S615 EEC routers before V7.2. SSA-565386 (CISA ICSA-23-080-07) covers the SCALANCE W-700 IEEE 802.11ax devices WAM763-1, WAM766-1, WUM763-1 and WUM766-1 before V2.0. SSA-942865 (2023-06-13, CISA ICSA-23-166-12) covers SINAMICS PERFECT HARMONY GH180 drives produced between October 2021 and May 2023 with an integrated SCALANCE S615, fixed by updating the S615 to V7.2. For those drives Siemens says the fieldbus connections are unaffected and the availability impact is limited to the S615, so it lowers A:H to A:L. Siemens scores the CVE 6.6, vector CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.

On a device the risk depends on whether anything feeds awk a program built from received data. Fixed one-liners in init scripts are low risk. Our BusyBox vulnerabilities in embedded Linux firmware guide uses this CVE range in its worked example and shows how to check whether awk is compiled in and reachable. The sibling bugs from the same disclosure are CVE-2021-42380, CVE-2021-42386 and the hush flaw CVE-2021-42377.

CVE-2021-42378 is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0276, the 86th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS).

To fix it, update the Siemens devices to the versions above. In your own firmware, ship BusyBox 1.34.0 or later, or remove awk if no script needs it. The Debian Security Tracker shows the backport route: bullseye was fixed in 1:1.30.1-6+deb11u1 through DLA-4019-1. Our memory corruption fix guide covers use-after-free as a class.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • Use-after-free in awk getvar_i; NVD CVSS 3.1 7.2 (AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H), CWE-416; CPE 1.16.0 through 1.33.1. — NVD
  • Applies if the attacker can supply an arbitrary pattern to awk; awk built by default and shipped in Ubuntu's binary; all 14 fixed in 1.34.0 (19 August 2021). — Claroty Team82
  • awk 1.16 to 1.33.1 affected; JFrog score 6.6. — JFrog
  • RUGGEDCOM RM1224 and SCALANCE M-800/S615 before V7.2 affected; Siemens CVSS 6.6 (AV:N/AC:H/PR:H); fixed in V7.2. — Siemens ProductCERT SSA-419740
  • SCALANCE W-700 IEEE 802.11ax before V2.0 affected; fixed in V2.0. — Siemens ProductCERT SSA-565386
  • SINAMICS PERFECT HARMONY GH180 produced Oct 2021 to May 2023 with integrated S615 affected; update S615 to V7.2; fieldbus unaffected, A:H lowered to A:L. — Siemens ProductCERT SSA-942865
  • bullseye fixed in 1:1.30.1-6+deb11u1 (DLA-4019-1). — Debian Security Tracker
  • Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.02756 (86th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Siemens ProductCERT SSA-419740: Third-Party Component Vulnerabilities in RUGGEDCOM and SCALANCE Products before V7.2
  3. CISA ICS Advisory ICSA-23-075-01
  4. Siemens ProductCERT SSA-565386: Third-Party Component Vulnerabilities in SCALANCE W-700 IEEE 802.11ax devices before V2.0
  5. Siemens ProductCERT SSA-942865: Integrated SCALANCE S615 of SINAMICS Medium Voltage Products
  6. CISA ICS Advisory ICSA-23-166-12
  7. Claroty Team82: Unboxing BusyBox, 14 vulnerabilities
  8. JFrog: Unboxing BusyBox, 14 new vulnerabilities
  9. Debian Security Tracker
  10. Debian LTS Advisory DLA-4019-1
  11. CISA KEV
  12. FIRST EPSS

Frequently asked questions

Which Siemens products are affected by CVE-2021-42378?

RUGGEDCOM RM1224 and SCALANCE M-800 and S615 routers before V7.2 (SSA-419740), SCALANCE W-700 IEEE 802.11ax devices before V2.0 (SSA-565386), and the SCALANCE S615 integrated in SINAMICS PERFECT HARMONY GH180 drives (SSA-942865) (per Siemens ProductCERT).

What does an attacker need to exploit CVE-2021-42378?

The ability to supply an arbitrary awk pattern to BusyBox awk. That is why NVD and Siemens both require high privileges in their CVSS vectors (per Claroty Team82, NVD and Siemens ProductCERT).

Which BusyBox version fixes CVE-2021-42378?

BusyBox 1.34.0, released 19 August 2021. NVD lists 1.16.0 through 1.33.1 as affected, and Debian backported the fix to bullseye in 1:1.30.1-6+deb11u1 (per Claroty Team82, NVD and the Debian Security Tracker).

Is CVE-2021-42378 in the CISA KEV catalog?

No, not as of 2026-11-17 (catalog version 2026.11.13). FIRST EPSS gives it 0.0276, the 86th percentile, in the 2026-11-16 dataset (per CISA KEV and FIRST EPSS).