Security Advisory

CVE-2023-42366: BusyBox awk Heap Buffer Overflow

Last updated:
  • CVE-2023-42366

CVE-2023-42366 is a heap buffer overflow in the next_token function of the BusyBox awk applet, reported in BusyBox 1.36.1. NVD scores it 5.5. As of 2026-11-17 neither the 1.37.0 nor the 1.38.0 change log names a fix, and Debian patched it only in unstable. Siemens lists it for SINEC OS devices before V3.3.

Vulnerability summary

CVSS base score

5.5

Medium severity

EPSS score (FIRST)

0.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2023-42366 · Source: NVD

Affected components

ComponentCPEVersion range
BusyBox (awk applet, next_token in editors/awk.c)cpe:2.3:a:busybox:busybox:1.36.1:*:*:*:*:*:*:*NVD CPE: 1.36.1; no fix named in the 1.37.0 or 1.38.0 change logs; Debian fixed it in unstable 1:1.37.0-8
Siemens SINEC OS devices: RUGGEDCOM RST2428P, SCALANCE XCM-/XRM-/XCH-/XRH-300 family, and SCALANCE XC-300/XR-300/XC-400/XR-500 family when migrated to SINEC OS—all versions before V3.3; fixed in V3.3 (Siemens ProductCERT SSA-089022, CISA ICSA-26-043-06)

What does this mean for affected devices?

CVE-2023-42366 is a heap-based buffer overflow (CWE-787 in NVD's analysis; Siemens files it as CWE-119). NVD's description reads "A heap-buffer-overflow was discovered in BusyBox v.1.36.1 in the next_token function at awk.c:1159." NVD scores it 5.5 (medium), vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H, and its CPE lists 1.36.1 alone (NVD).

Unlike its siblings, this one has no upstream release fix to point at. The BusyBox 1.37.0 change log names CVE-2023-42363 and the 1.38.0 change log names CVE-2023-39810, but neither mentions CVE-2023-42366 (BusyBox news, checked 2026-11-17). The Debian Security Tracker lists bookworm (1:1.35.0-4+deb12u1) and trixie (1:1.37.0-6) as vulnerable, with the note "revisit when fixed upstream". It marks the fix only in unstable from 1:1.37.0-8; forky and sid now carry 1:1.38.0-3. So moving to BusyBox 1.37.0 or 1.38.0 alone does not close it; the Debian patch has to come along.

Siemens ProductCERT SSA-089022, published 2026-01-28 and updated 2026-02-24, lists it for all SINEC OS versions before V3.3, republished by CISA as ICSA-26-043-06 on 2026-02-12. The affected devices are the RUGGEDCOM RST2428P Layer 2 switch, the SCALANCE XCM-/XRM-/XCH-/XRH-300 family and, since the 2026-02-24 update, the SCALANCE XC-300/XR-300/XC-400/XR-500 family, which Siemens says is affected only when it has been migrated from MSPS to SINEC OS firmware. The fix is SINEC OS V3.3. Siemens scores this CVE 5.5, the same as NVD, and lists it with CVE-2023-42363, CVE-2023-42364, CVE-2023-42365, the cpio flaw CVE-2023-39810 and the ash flaw CVE-2022-48174.

The overflow sits in the awk lexer, so it needs an attacker-supplied awk program, like the use-after-free bugs. Our BusyBox vulnerabilities in embedded Linux firmware guide singles this CVE out as the one that "needs a downstream patch" and recommends removing awk with the AWK config symbol when no script needs it.

CVE-2023-42366 is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0042, the 36th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS).

To fix it, update Siemens SINEC OS devices to V3.3. In your own firmware, carry the Debian unstable patch on top of your BusyBox version or build without awk, then re-scan the image and record which one you chose. Our memory corruption fix guide covers heap overflows 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

  • Heap-buffer-overflow in next_token at awk.c:1159 in BusyBox 1.36.1; NVD CVSS 3.1 5.5 (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H), CWE-787; CPE 1.36.1. — NVD
  • 1.37.0 change log names CVE-2023-42363 and 1.38.0 names CVE-2023-39810; neither names CVE-2023-42366 (checked 2026-11-17). — BusyBox news
  • bookworm 1:1.35.0-4+deb12u1 and trixie 1:1.37.0-6 vulnerable, "revisit when fixed upstream"; fixed in unstable 1:1.37.0-8; forky/sid 1:1.38.0-3 fixed. — Debian Security Tracker
  • SINEC OS before V3.3 on RUGGEDCOM RST2428P and SCALANCE XC/XR/XCM/XRM/XCH/XRH devices affected; Siemens CVSS 5.5, CWE-119; fixed in V3.3. — Siemens ProductCERT SSA-089022
  • Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.00416 (36th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Siemens ProductCERT SSA-089022: Third-Party Components in SINEC OS before V3.3
  3. CISA ICS Advisory ICSA-26-043-06
  4. BusyBox news: 1.37.0 and 1.38.0 change logs
  5. Debian Security Tracker
  6. CISA KEV
  7. FIRST EPSS

Frequently asked questions

Which devices does Siemens list for CVE-2023-42366?

SSA-089022 lists all SINEC OS versions before V3.3 on the RUGGEDCOM RST2428P, the SCALANCE XCM-/XRM-/XCH-/XRH-300 family and the SCALANCE XC-300/XR-300/XC-400/XR-500 family when migrated to SINEC OS, fixed in V3.3 (per Siemens ProductCERT).

Does BusyBox 1.37.0 or 1.38.0 fix CVE-2023-42366?

Neither change log names it as of 2026-11-17. Debian lists its 1.37.0-6 package as vulnerable and fixed it in unstable 1:1.37.0-8 with its own patch (per busybox.net and the Debian Security Tracker).

Is CVE-2023-42366 remotely exploitable?

NVD rates it local with user interaction and availability impact only. It needs a crafted awk program, so it matters when a device runs awk on untrusted input (per NVD).

Is CVE-2023-42366 in the CISA KEV catalog?

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