CVE-2026-5066
net: sockets: tls: Potential out-of-bounds write/read in socket_op_vtable::connect function
Description
A potential out-of-bounds write/read exists in the TLS socket connect path of the network sockets subsystem (subsys/net/lib/sockets/sockets_tls.c). When the TLS session cache is enabled, tls_session_store() and tls_session_restore() memcpy the caller-supplied address into a fixed-size buffer using the caller-controlled addrlen value without validating it against the destination size. struct net_sockaddr is an opaque type, so an application can pass an addrlen larger than sizeof(struct net_sockaddr) (for example 128 bytes into a 24-byte stack buffer), causing the memcpy to read and write past the end of the address memory used by the TLS session cache. This out-of-bounds write can lead to a crash and denial of service, and potentially to arbitrary code execution.
INFO
Published Date :
June 4, 2026, 9:16 p.m.
Last Modified :
July 22, 2026, 8:10 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | e2e69745-5e70-4e92-8431-deb5529a81ad | ||||
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Validate addrlen against buffer size in tls_session_store().
- Validate addrlen against buffer size in tls_session_restore().
- Apply vendor patches when available.
- Update the network sockets subsystem.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-5066.
| URL | Resource |
|---|---|
| https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3 | Exploit Patch Vendor Advisory |
| https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3 | Exploit Patch Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-5066 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-5066
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-5066 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-5066 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 22, 2026
Action Type Old Value New Value Added Translation Title: Zephyr de zephyrproject-rtos, Description: Existe una potencial escritura/lectura fuera de límites en la ruta de conexión del socket TLS del subsistema de sockets de red (subsys/net/lib/sockets/sockets_tls.c). Cuando la caché de sesiones TLS está habilitada, tls_session_store() y tls_session_restore() copian con memcpy la dirección proporcionada por el llamador en un búfer de tamaño fijo usando el valor addrlen controlado por el llamador sin validarlo contra el tamaño de destino. struct net_sockaddr es un tipo opaco, por lo que una aplicación puede pasar un addrlen mayor que sizeof(struct net_sockaddr) (por ejemplo, 128 bytes en un búfer de pila de 24 bytes), causando que memcpy lea y escriba más allá del final de la memoria de la dirección utilizada por la caché de sesiones TLS. Esta escritura fuera de límites puede llevar a un fallo y denegación de servicio, y potencialmente a ejecución de código arbitrario. -
Initial Analysis by [email protected]
Jul. 08, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Added CPE Configuration OR *cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:* versions up to (including) 4.3.0 Added Reference Type Zephyr Project: https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3 Types: Exploit, Patch, Vendor Advisory Added Reference Type CISA-ADP: https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3 Types: Exploit, Patch, Vendor Advisory -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://github.com/zephyrproject-rtos/zephyr', 'vendor': 'zephyrproject-rtos', 'product': 'Zephyr', 'versions': [{'status': 'affected', 'version': '*', 'versionType': 'git', 'lessThanOrEqual': '4.3'}], 'packageName': 'Zephyr', 'defaultStatus': 'unaffected'}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-5066', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-05T18:26:28.322491Z'} -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 05, 2026
Action Type Old Value New Value Added Reference https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3 -
New CVE Received by [email protected]
Jun. 04, 2026
Action Type Old Value New Value Added Description A potential out-of-bounds write/read exists in the TLS socket connect path of the network sockets subsystem (subsys/net/lib/sockets/sockets_tls.c). When the TLS session cache is enabled, tls_session_store() and tls_session_restore() memcpy the caller-supplied address into a fixed-size buffer using the caller-controlled addrlen value without validating it against the destination size. struct net_sockaddr is an opaque type, so an application can pass an addrlen larger than sizeof(struct net_sockaddr) (for example 128 bytes into a 24-byte stack buffer), causing the memcpy to read and write past the end of the address memory used by the TLS session cache. This out-of-bounds write can lead to a crash and denial of service, and potentially to arbitrary code execution. Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L Added CWE CWE-787 Added Reference https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3