CVE-2026-42804: CWE-121 Stack-based Buffer Overflow in Bosch Sensortec BHI360_SensorAPI (C-Library)
A stack-based buffer overflow vulnerability exists in the Bosch Sensortec BHI360 SensorAPI(C-Library) in versions up to and including commit d6b200416a. The vulnerability is located within the FIFO parsing and debug logging subsystem inside the function bhi360_parse_debug_message() in bhi360_parse.c (lines 1852-1875). The parser trusts the first payload byte of a debug frame as the message length (msg_length) and copies that many bytes into a fixed-size 17-byte stack buffer (debug_msg) via memcpy without performing any bounds checking. A locally or physically positioned attacker (e.g., via a malicious sensor, counterfeit hardware module, or a Man-in-the-Middle on the communication bus) can exploit this vulnerability by injecting a crafted debug frame with a length byte exceeding 16. This corrupts adjacent stack data, including the saved return address. Furthermore, because the overflowed buffer is subsequently passed to a printf-style logging sink, the attacker can supply format string specifiers (e.g., %n) to execute arbitrary code on the host microcontroller/SoC or cause a reliable system crash (Denial of Service).
AI Analysis
Technical Summary
The vulnerability exists in the Bosch Sensortec BHI360 SensorAPI (C-Library) version 2.1.0 within the function bhi360_parse_debug_message() in bhi360_parse.c. The parser trusts the first payload byte of a debug frame as the message length and copies that many bytes into a fixed 17-byte stack buffer without bounds checking. This stack-based buffer overflow can be triggered by a locally or physically positioned attacker who injects a crafted debug frame with a length byte greater than 16. The overflow corrupts adjacent stack data including the saved return address. Because the overflowed buffer is passed to a printf-style logging function, an attacker can supply format string specifiers to execute arbitrary code on the host microcontroller or cause a system crash (denial of service).
Potential Impact
Successful exploitation can lead to arbitrary code execution on the host microcontroller or system-on-chip, or cause a reliable denial of service via system crash. The attack requires local or physical access, such as a malicious sensor, counterfeit hardware module, or man-in-the-middle on the communication bus. The vulnerability compromises confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, restrict physical and local access to the device and communication bus to trusted entities to reduce risk of exploitation.
CVE-2026-42804: CWE-121 Stack-based Buffer Overflow in Bosch Sensortec BHI360_SensorAPI (C-Library)
Description
A stack-based buffer overflow vulnerability exists in the Bosch Sensortec BHI360 SensorAPI(C-Library) in versions up to and including commit d6b200416a. The vulnerability is located within the FIFO parsing and debug logging subsystem inside the function bhi360_parse_debug_message() in bhi360_parse.c (lines 1852-1875). The parser trusts the first payload byte of a debug frame as the message length (msg_length) and copies that many bytes into a fixed-size 17-byte stack buffer (debug_msg) via memcpy without performing any bounds checking. A locally or physically positioned attacker (e.g., via a malicious sensor, counterfeit hardware module, or a Man-in-the-Middle on the communication bus) can exploit this vulnerability by injecting a crafted debug frame with a length byte exceeding 16. This corrupts adjacent stack data, including the saved return address. Furthermore, because the overflowed buffer is subsequently passed to a printf-style logging sink, the attacker can supply format string specifiers (e.g., %n) to execute arbitrary code on the host microcontroller/SoC or cause a reliable system crash (Denial of Service).
CVSS v3.1
Score 7.6high
Affected software
pkg:github/bosch-sensortec/BHI360_SensorAPIRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the Bosch Sensortec BHI360 SensorAPI (C-Library) version 2.1.0 within the function bhi360_parse_debug_message() in bhi360_parse.c. The parser trusts the first payload byte of a debug frame as the message length and copies that many bytes into a fixed 17-byte stack buffer without bounds checking. This stack-based buffer overflow can be triggered by a locally or physically positioned attacker who injects a crafted debug frame with a length byte greater than 16. The overflow corrupts adjacent stack data including the saved return address. Because the overflowed buffer is passed to a printf-style logging function, an attacker can supply format string specifiers to execute arbitrary code on the host microcontroller or cause a system crash (denial of service).
Potential Impact
Successful exploitation can lead to arbitrary code execution on the host microcontroller or system-on-chip, or cause a reliable denial of service via system crash. The attack requires local or physical access, such as a malicious sensor, counterfeit hardware module, or man-in-the-middle on the communication bus. The vulnerability compromises confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, restrict physical and local access to the device and communication bus to trusted entities to reduce risk of exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bosch
- Date Reserved
- 2026-04-30T08:03:11.875Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6aa2735cacd9273b49d4addf
Added to database: 09/10/2026, 09:07:40 UTC
Last enriched: 09/10/2026, 09:22:09 UTC
Last updated: 09/10/2026, 11:04:32 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.