Out-of-bounds write in DTLS peer Connection ID getsockopt (`TLS_DTLS_PEER_CID_VALUE`) in Zephyr net sockets/TLS
tls_opt_dtls_peer_connection_id_value_get() in subsys/net/lib/sockets/sockets_tls.c, which handles getsockopt(SOL_TLS, TLS_DTLS_PEER_CID_VALUE), passed the caller-supplied optval directly to mbedtls_ssl_get_peer_cid() without verifying the buffer was at least MBEDTLS_SSL_CID_OUT_LEN_MAX (default 32) bytes. mbedtls_ssl_get_peer_cid() copies the peer-negotiated DTLS Connection ID (length 1..MBEDTLS_SSL_CID_OUT_LEN_MAX) into that buffer without a destination-size parameter, so a caller-supplied optlen smaller than the CID causes a write of up to 31 bytes past the buffer end. In CONFIG_USERSPACE builds the getsockopt syscall verifier (z_vrfy_zsock_getsockopt) bounce-buffers the user's optval into a kernel allocation of exactly optlen bytes (k_usermode_alloc_from_copy -> z_thread_malloc), so an unprivileged user thread that passes a small optlen on a connected DTLS socket with Connection ID enabled induces a kernel-heap buffer overflow, with the overflowing content being the remote peer's CID. The defect requires CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID, an established DTLS session with a negotiated peer CID, and (for the kernel-crossing case) CONFIG_USERSPACE. Introduced when the TLS_DTLS_CID option was added (v3.5.0). The fix rejects callers whose optlen is below MBEDTLS_SSL_CID_OUT_LEN_MAX with -EINVAL.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for help- Published
- Aug 10, 2026
- Updated
- Aug 26, 2026
- EPSS
- 0.2% · 5th percentile
- CWE
- CWE-787
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
33
Monitor
Low priority for now.
- CVSS
- 33 / 40 · 8.4 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · zephyr
- 8.4
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
—
Versions reported by the vendor
Affected version ranges reported by the assigning authority (zephyr). Independent of NVD's CPE analysis and usually ahead of it.
zephyrproject zephyr
- 3.5.0 and later · before 4.4.1affected · semver
Same product
zephyrproject: all recordsOther highest-scoring records for the same primary product.
- CVE-2023-4260Potential off-by-one buffer overflow vulnerability in the Zephyr FS subsystem40Plan
- CVE-2021-3625Buffer overflow in Zephyr USB DFU DNLOAD40Plan
- CVE-2020-10071Insufficient publish message length validation in MQTT40Plan
- CVE-2020-10070MQTT buffer overflow on receive buffer40Plan
- CVE-2020-10062Packet length decoding error in MQTT40Plan
- CVE-2020-10022UpdateHub Module Copies a Variable-Size Hash String Into a Fixed-Size Array40Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| zephyrproject zephyr | 4.4.1 | Vendor (CNA) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-1321415 days apartStack buffer overflow in OCPP GetConfiguration key parsing39Monitor
- CVE-2026-1678158 days apartdns: memory‑safety issue in the DNS name parser39Monitor
- CVE-2026-125229 days apartStack buffer overflow in Zephyr hl7800 modem driver parsing network-supplied +CGCONTRDP address fields35Monitor
- CVE-2026-506862 days apartbt: l2cap le coc: remote oob write via seg counter stored in net_buf user_data35Monitor
- CVE-2026-506667 days apartnet: sockets: tls: Potential out-of-bounds write/read in socket_op_vtable::connect function35Monitor
- CVE-2026-126339 days apartOut-of-bounds write in IPv6 6LoWPAN Context Option handling via unauthenticated Router Advertisement32Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- None
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-787 · Out-of-bounds WriteCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/zephyrproject-rtos/zephyr/commit/aa317825a55a401315e8e17f620c70c02e8f176d
- github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p3r6-mx6c-33gq
Vendor advisories and official records. Exploit/PoC links are deliberately left out.