# CVE-2026-18747: Integer underflow of net\_buf length in the MCUmgr serial (SMP over console) transport leads to out-of-bounds read

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

- **Severity:** MEDIUM 6.8
- **CVSS:** 6.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; 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.16% (percentile 3, 2026-11-26)
- **CWE:** CWE-125, CWE-191
- **Published:** 2026-09-28T23:25:26.081Z
- **Modified:** 2026-11-06T18:07:42.613Z

## Who should check

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

## Description

The MCUmgr SMP-over-console transport decodes a base64 frame, reads a 16-bit packet length from it, verifies a CRC and then unconditionally strips the trailing CRC with rx\_ctxt-\>nb-\>len -= 2U; in mcumgr\_serial\_process\_frag() (subsys/mgmt/mcumgr/transport/src/serial\_util.c). mcumgr\_serial\_extract\_len() accepted any declared length, including 0 and 1, and a packet declaring length 0 passes the checksum test for free because crc16\_itu\_t() over zero bytes returns the zero seed. Since net\_buf::len is a uint16\_t, the subtraction underflows and the buffer is handed to SMP claiming roughly 65 KB of payload while its data area is only CONFIG\_MCUMGR\_TRANSPORT\_NETBUF\_SIZE bytes (default 384).

The trigger is a single unauthenticated 7-byte line on the management console — the 0x06 0x09 packet marker followed by the base64 group AAA= and a newline — delivered to any transport built on this helper: CONFIG\_MCUMGR\_TRANSPORT\_UART (smp\_uart.c) or CONFIG\_MCUMGR\_TRANSPORT\_SHELL (smp\_shell.c), both of which select MCUMGR\_TRANSPORT\_SERIAL\_HAS\_SMP\_OVER\_CONSOLE. No prior session state, fragmentation or credentials are required to trigger the underflow, and the malformed frame is mishandled before any command handler or command-level access control runs. The attacker only needs write access to that console, which on many boards is a USB CDC-ACM port rather than a bare UART header.

With the inflated length, smp\_process\_request\_packet() in subsys/mgmt/mcumgr/smp/src/smp.c loses its bound: cbor\_nb\_reader\_init() gives the CBOR decoder a ~65 KB window into a 384-byte buffer, and each request header's nh\_len is checked only against the inflated length. On its own the 7-byte frame re-parses whatever stale bytes the reused pool buffer still holds, typically a replay of the previously received request followed by a parse error, without leaving the buffer. Because the transport is unauthenticated, though, the attacker also controls the frames sent before the trigger, and can stage buffer contents so that a request succeeds with an nh\_len larger than the buffer; net\_buf\_pull(), guarded only by \_\_ASSERT\_NO\_MSG, then moves the parse cursor out of bounds and the loop reads further headers and CBOR from adjacent memory. The consequence is an out-of-bounds read that can fault the MCUmgr thread (denial of service); memory disclosure is also possible, since the default-enabled os echo handler (CONFIG\_MCUMGR\_GRP\_OS\_ECHO) decodes its string inside that window and copies it into its response. There is no integrity gain beyond what the unauthenticated transport already permits.

The fix rejects any declared packet length of two bytes or fewer in mcumgr\_serial\_extract\_len(), so the CRC-strip subtraction can no longer underflow. The identical pattern remains in the test-only loopback transport subsys/mgmt/mcumgr/transport/src/smp\_dummy.c (CONFIG\_MCUMGR\_TRANSPORT\_DUMMY), which has no external input path and therefore carries no practical exposure.

## Affected and fixed versions

- zephyrproject zephyr: \>= 1.11.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-18747. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-18747.md
Affected: zephyrproject zephyr >= 1.11.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-18747 being exploited?

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

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

Medium: CVSS 6.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

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

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

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-18747?

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-g6cx-xj75-hvfw>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/f7fc3e779a59c68c96eaf63a6b03ac7489f5e4a5>

## 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-18747>

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