CVE-2026-8718: Zephyr TLS - Buffer Overflow
- Cve: CVE-2026-8718
- Name: Zephyr TLS - Buffer Overflow
- Description: 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.
- Impact: Unprivileged users can cause kernel heap buffer overflow, potentially leading to system crash or arbitrary code execution.
- Remediation: Update to version after v3.5.0 where optlen is validated and callers with insufficient buffer length are rejected.
- Vulnerability type: buffer_overflow
- Vulnerability impact: denial_of_service, remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.4
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
- Epss score: 0.00171
- Epss percentile: 0.06474
- Assignee: [email protected]
- Published at: 2026-08-10T23:16:51Z
- Age in days: 106
- Modified at: 2026-11-04T05:19:05Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-8718
- Nvd status: awaiting_analysis
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-787 | Out-of-bounds Write |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/zephyrproject-rtos/zephyr/commit/aa317825a55a401315e8e17f620c70c02e8f176d | nvd | |
| https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p3r6-mx6c-33gq | nvd |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| zephyrproject:zephyr | >= 4.4.0, < 4.4.1; >= 3.5.0, < 4.3.2 | no | cna_alias | /v1/products/zephyrproject/zephyr |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| zephyrproject-rtos/zephyr | commit, fix, security_advisory | yes | /v1/repositories/zephyrproject-rtos/zephyr |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts