Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Update server controls HTTP response over network with no device-side auth; impact is heap corruption causing DoS only, no confidentiality or integrity loss.
Primary rating from Vendor (zephyr).
CVSS VectorNVD
Lifecycle Timeline
6DescriptionNVD
The hawkBit device management client in subsys/mgmt/hawkbit accumulates the body of an HTTP response from the update server into a heap buffer in response_json_cb() (subsys/mgmt/hawkbit/hawkbit.c). The buffer is sized to hold the received body bytes but reserves no space for a terminating NUL. When the full response has arrived, the code writes response_data[downloaded_size] = '\0' - and whenever the accumulated body length equals the allocation, that terminator lands one byte past the end of the heap object (a heap-based out-of-bounds write, CWE-122 / CWE-787).
The body length and fragmentation are taken directly from the parsed HTTP response (rsp->body_frag_start / rsp->body_frag_len) and are fully controlled by the remote hawkBit server, which chooses its own response length. The precise trigger depends on how the buffer grows, and both forms are remotely reachable. Since v4.0.0 the reallocation is sized to exactly downloaded_size + body_len, so any response body larger than the 1100-byte initial buffer makes the out-of-bounds write deterministic; such response sizes are normal for hawkBit deployment metadata. Before v4.0.0 the buffer grew by doubling and the growth check ((downloaded_size + body_len) > response_buffer_size) is false at equality, so a response body whose length is exactly the current allocation - 1100 bytes with the default initial buffer - skips the reallocation entirely and writes the terminator at response_data[1100] of an 1100-byte object. The HTTP length-mismatch check does not catch this, because the declared and received lengths genuinely agree. Either form is reachable by a malicious, compromised, or man-in-the-middle update server (TLS is optional and, when enabled, does not protect against a hostile server), with no authentication of response content and no client-side length cap protecting the write.
The out-of-bounds write is a fixed single NUL byte immediately following the allocation, corrupting adjacent allocator metadata or the next allocation. The practical impact is heap corruption leading to denial of service (fault on a subsequent allocation or free), with the bounded, allocator-dependent possibility of further corruption. The fix sizes the buffer to the body length plus one and copies with memcpy, ensuring the terminator always lands within the allocation.
AnalysisAI
Heap-based out-of-bounds write in the Zephyr RTOS hawkBit OTA update client (versions 2.4.0 through <4.5.0) allows a malicious or compromised hawkBit update server to corrupt device heap memory by sending a crafted HTTP response body. The off-by-one flaw in response_json_cb() allocates exactly the response body length with no room for the NUL terminator, writing one byte past the heap object and corrupting adjacent allocator metadata. No public exploit identified at time of analysis, but the SSVC framework rates this as automatable and the trigger is deterministic in Zephyr v4.0.0 and later for any response body exceeding 1100 bytes - a size normal for hawkBit deployment metadata.
Technical ContextAI
The Zephyr RTOS hawkBit management client (subsys/mgmt/hawkbit/hawkbit.c) accumulates HTTP response bodies chunk-by-chunk into a dynamically reallocated heap buffer in response_json_cb(). CWE-122 (Heap-Based Buffer Overflow) is the root cause: the reallocation sizing logic omitted +1 for the NUL terminator appended after the final fragment. In Zephyr v4.0.0+, the buffer is grown to exactly downloaded_size + body_len, so any response body larger than the 1100-byte default initial buffer makes the out-of-bounds write deterministic. Prior to v4.0.0, a doubling-growth scheme contained an off-by-one in the growth check - a response body whose length exactly equals the current allocation (1100 bytes at default) bypasses reallocation entirely, and the terminator lands at response_data[1100] of a 1100-byte object. The HTTP declared-length check does not protect against this because declared and received lengths agree. The fix, visible in commit 59d7ab58d853, resizes to downloaded_size + body_len + 1 and replaces strncpy with memcpy, eliminating both variants. CPE: cpe:2.3:a:zephyrproject:zephyr.
RemediationAI
The upstream patch is available as commit 59d7ab58d853489e6134081cadb11733730264ac (https://github.com/zephyrproject-rtos/zephyr/commit/59d7ab58d853489e6134081cadb11733730264ac); upgrade to Zephyr 4.5.0 or cherry-pick this commit into downstream firmware builds. The fix adds +1 to the allocation size and replaces strncpy with memcpy, eliminating both the v4.0.0+ deterministic variant and the pre-v4.0.0 equality-skips-realloc variant. If upgrading is not immediately possible, disable the hawkBit client (unset CONFIG_HAWKBIT) as a compensating control - this removes the attack surface entirely but also disables OTA updates. Alternatively, restrict network access from devices to only trusted, TLS-authenticated update server endpoints and enforce certificate pinning to prevent MitM; this does not eliminate the flaw but removes the remote attack path for non-insider threat scenarios. Advisory: https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-39h3-7phx-pwhv.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
Same weakness CWE-122 – Heap-based Buffer Overflow
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-52447