Security Advisory

CVE-2019-5747: BusyBox udhcp DHCP_SUBNET Out-of-Bounds Read

Last updated:
  • CVE-2019-5747

CVE-2019-5747 is an out-of-bounds read (CWE-125) in udhcp, the BusyBox DHCP code, through 1.30.0: udhcpc reads 4 bytes from the subnet mask option without checking its length, so a crafted DHCP reply leaks stack memory. NVD scores it 7.5. The fix ships in BusyBox 1.31.0; the 1.30.1 stable release still lacks it.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

4.7%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2019-5747 · Source: NVD

Affected components

ComponentCPEVersion range
BusyBox (udhcp: udhcpc fill_envp() in networking/udhcp/dhcpc.c)cpe:2.3:a:busybox:busybox:*:*:*:*:*:*:*:*through 1.30.0 (NVD); the 1.30.1 stable release also lacks fix 74d9f1b, first released in 1.31.0 (10 June 2019)
OpenWrt 19.07: busybox package—BusyBox 1.30.1 with no patch for 74d9f1b; OpenWrt 21.02.0 ships 1.33.1

What does this mean for affected devices?

NVD's description: "An issue was discovered in BusyBox through 1.30.0. An out of bounds read in udhcp components (consumed by the DHCP client, server, and/or relay) might allow a remote attacker to leak sensitive information from the stack by sending a crafted DHCP message. This is related to assurance of a 4-byte length when decoding DHCP_SUBNET. NOTE: this issue exists because of an incomplete fix for CVE-2018-20679." NVD's Primary score is CVSS v3.1 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) with CWE-125, and CISA's ADP entry gives the same score; the CPE configuration stops at 1.30.0. The record was published on 2019-01-09 (NVD).

Where is the read?

When udhcpc builds the environment for its script, fill_envp() exports each option and, for the subnet mask option, also copies its first 4 bytes into an integer so the script can use values like $ip/$mask. In 1.30.0 that copy ran whatever the option's length was, so a subnet option shorter than 4 bytes made the client read past it. Commit 74d9f1b of 2019-01-07, "udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long", adds the length check to that branch. It follows the fix for CVE-2018-20679, which added 4-byte checks in 1.30.0 but missed this path.

Which versions carry it?

NVD's range ends at 1.30.0, but the commit is not in the 1.30.1 stable release of 14 February 2019; the BusyBox news page lists it among the changes in 1.31.0 of 10 June 2019. So 1.30.1 is affected unless the vendor applied the commit. OpenWrt 19.07 is one such build: its branch ships BusyBox 1.30.1 and the patch set has no subnet-length fix; OpenWrt 21.02.0 moved to 1.33.1. The Debian security tracker marks jessie, stretch and buster as not affected because the incomplete CVE-2018-20679 fix never reached them, and fixed unstable in 1:1.30.1-2. We found no vendor or CISA advisory that names a device for this CVE.

How do you fix or mitigate it?

Move to BusyBox 1.31.0 or later, or apply commit 74d9f1b, ideally together with the CVE-2018-20679 commit, to any 1.30.x tree. udhcpc parses the replies of DHCP servers on its link, so the attacker needs only a host on that segment that can answer. CISA's ADP assessment records no exploitation and rates the bug as not automatable with partial technical impact. Our DHCP client and server guide walks through this exact 1.30.1 case, and the BusyBox firmware guide covers reading patch lists. Older udhcpc flaws are CVE-2016-2147 and CVE-2016-2148; the memory corruption fix guide covers out-of-bounds reads as a class.

CVE-2019-5747 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.04651, the 92nd percentile, in the 2026-11-17 dataset (CISA KEV, FIRST EPSS).

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

  • NVD: BusyBox through 1.30.0, out of bounds read in udhcp components, leak stack information via crafted DHCP message, 4-byte length when decoding DHCP_SUBNET, incomplete fix for CVE-2018-20679; Primary CVSS v3.1 7.5 C:H; CISA-ADP 7.5; SSVC exploitation none, automatable no, technical impact partial; CWE-125; CPE <=1.30.0; published 2019-01-09. — NVD
  • Commit 74d9f1b (2019-01-07) 'udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long': fill_envp() 'if (code == DHCP_SUBNET && temp[-OPT_DATA + OPT_LEN] == 4)' before move_from_unaligned32. GitHub compare: not in 1_30_1, in 1_31_0. — BusyBox (GitHub mirror)
  • BusyBox news: 1.31.0 (10 June 2019) change log lists 'udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long'; 1.30.1 (14 February 2019, stable) bug fix release without it. — BusyBox
  • OpenWrt openwrt-19.07 busybox Makefile PKG_VERSION 1.30.1, PKG_RELEASE 6; patches directory has no DHCP_SUBNET fix; v21.02.0 PKG_VERSION 1.33.1. — OpenWrt (GitHub)
  • Debian security tracker: jessie, stretch, buster not affected (incomplete fix for CVE-2018-20679 not applied / did not reach buster); unstable fixed 1:1.30.1-2. — Debian security tracker
  • CVE-2019-5747 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
  • EPSS 0.04651, percentile 0.91892, dataset 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. BusyBox commit 74d9f1b
  3. BusyBox news (release change logs)
  4. OpenWrt 19.07 busybox Makefile
  5. OpenWrt 19.07 busybox patches
  6. Debian security tracker
  7. CISA KEV
  8. FIRST EPSS

Frequently asked questions

Is BusyBox 1.30.1 affected by CVE-2019-5747?

Yes, unless the vendor applied commit 74d9f1b. NVD's range ends at 1.30.0, but the 1.30.1 stable release does not contain the fix, which first shipped in 1.31.0 of 10 June 2019 (per NVD, the BusyBox news page and the BusyBox source).

How is CVE-2019-5747 related to CVE-2018-20679?

The 1.30.0 fix for CVE-2018-20679 added 4-byte checks on udhcp options but missed the path that copies the subnet mask into the script environment. CVE-2019-5747 covers that path; Debian marks older releases without the first fix as not affected (per NVD and the Debian security tracker).

What can an attacker get from CVE-2019-5747?

Stack memory from the DHCP client process, read past a short subnet mask option, by sending a crafted DHCP reply from the same network segment. NVD rates confidentiality impact high and integrity and availability impact none (per NVD).

Is CVE-2019-5747 in the CISA KEV catalog?

No, not as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.04651, the 92nd percentile, in the 2026-11-17 dataset (per CISA KEV and FIRST EPSS).