# CVE-2026-42805: Memory corruption in BHI385 SensorAPI (C Library)

> A stack-based buffer overflow in the Bosch BHI385 SensorAPI allows attackers to cause denial of service or execute arbitrary code via malicious sensor data.

- **Severity:** High 8.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 10 Sep 2026
- **Updated:** 10 Sep 2026
- **Also known as:** GHSA-7h94-3r4w-8qw8

## What is CVE-2026-42805?

CVE-2026-42805 is a high-severity memory corruption vulnerability in Bosch Sensortec BHI385 SensorAPI (C Library), published on 10 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A stack-based buffer overflow vulnerability exists in the Bosch Sensortec BHI385 SensorAPI (C library) within the debug message parser function bhi385_parse_debug_message (located in bhi385_parse.c). 

The function parses FIFO events and extracts an 8-bit message length directly from the attacker-controlled event payload (callback_info->data_ptr[0]) without enforcing bounds checks or clamping the value.

When copying the payload into a fixed-size stack buffer of 17 bytes (uint8_t debug_msg[17]) via memcpy, providing a length byte greater than 16 causes the function to write past the allocated stack boundary. 

This memory corruption can be triggered by a malicious or compromised sensor or bus participant, leading to a firmware crash, Denial of Service (DoS), or potentially the execution of arbitrary code via adjacent stack data corruption.

Weakness: CWE-121 (Stack-based Buffer Overflow)

## Which versions are affected by CVE-2026-42805?


## How do I fix CVE-2026-42805?

No fix has been published for CVE-2026-42805 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-42805 being exploited?

There is no known exploitation of CVE-2026-42805 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42805 and fix it if it is affected.

What it is: CVE-2026-42805 is a high-severity memory corruption vulnerability in Bosch Sensortec BHI385 SensorAPI (C Library), published on 10 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-42805 in the wild and no public exploit code.

Affected product: Bosch Sensortec BHI385 SensorAPI (C Library). No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-42805/ (Markdown: https://insights.sbomify.com/CVE-2026-42805/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-42805
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-42805
- OSV: https://osv.dev/vulnerability/CVE-2026-42805

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-42805/
Summaries are generated and may contain mistakes; the official description above is the record.
