# CVE-2026-12520: Stack buffer overflow and off-by-one writes in Zephyr HL7800 modem AT response handlers

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.4
- **CVSS:** 6.4 (v3.1, CNA) `CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2026-08-18T19:41:07.446Z
- **Modified:** 2026-11-04T05:18:39.630Z

## Who should check

- Anyone running zephyrproject zephyr \>= 2.4.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2

## Description

The Sierra Wireless HL7800 cellular modem driver (drivers/modem/vendor\_standalone/hl7800.c, located at drivers/modem/hl7800.c in v4.4.0 and earlier) parses AT responses with roughly twenty handlers that call net\_buf\_linearize(value, sizeof(value), \*buf, 0, len) into a 128-byte stack buffer and then write value\[out\_len\] = 0. Because net\_buf\_linearize() (lib/net\_buf/buf.c) can return a count equal to its destination-length argument, a field that exactly fills the buffer makes the terminating NUL land one byte past the end, a single-byte out-of-bounds write into adjacent stack memory.

The +KCELLMEAS cell-measurement handler on\_cmd\_atcmdinfo\_rssi() is worse: it passed the wire length len as the destination size (net\_buf\_linearize(value, len, \*buf, 0, len)), so a response line longer than 128 bytes overflows the value stack buffer with attacker-influenceable content. The line length comes from net\_buf\_findcrlf(), which accumulates bytes across the whole net\_buf fragment chain and is not bounded to 128, so an over-long line reaches the defect.

The data originates from the cellular modem over UART, driven by the network: operator-scan results, +CGCONTRDP IP/DNS info, socket indications, and +KCELLMEAS neighbour-cell reports. An attacker able to shape what the modem emits — a rogue base station, a compromised modem baseband, or a remote peer feeding oversized response framing — can drive a line past 128 bytes. The handlers run in the driver's RX thread in kernel context, so the corruption is kernel-side.

The +KCELLMEAS path is a full stack buffer overflow whose worst case is code execution in kernel context and whose floor is a reliable crash; the remaining sites are single-byte NUL out-of-bounds writes. Exploitation requires the modem to emit an over-long AT response line, giving high attack complexity over an adjacent (cellular radio) vector. The fix passes sizeof(dst) - 1 (and correct explicit bounds for the IMSI and +KCELLMEAS sites) so the terminator always stays in bounds.

## Affected and fixed versions

- zephyrproject zephyr: \>= 2.4.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-12520. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-12520.md
Affected: zephyrproject zephyr >= 2.4.0, < 4.3.2; >= 4.4.0, < 4.4.2
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-12520 being exploited?

There is no confirmed exploitation: CVE-2026-12520 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-12520?

Medium: CVSS 6.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

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

zephyrproject zephyr \>= 2.4.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2.

### Is there a fix for CVE-2026-12520?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.

### How do I check if I'm affected by CVE-2026-12520?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-9xc4-j5x8-v6jx>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/ea91f9375677aa4268e4044e096902dbe789f101>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-12520>

HTML: <https://flawdb.com/CVE-2026-12520> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-12520>
