{"id":"CVE-2026-5066","state":"PUBLISHED","title":"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.","publishedAt":"2026-06-04T20:31:25.630Z","updatedAt":"2026-10-15T22:10:24.916Z","severity":{"score":6.3,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","source":"zephyr"},"assigner":"zephyr","products":["zephyrproject-rtos Zephyr"],"affected":[{"vendor":"zephyrproject-rtos","product":"Zephyr","packageName":"Zephyr","defaultStatus":"unaffected","versions":[{"version":"*","status":"affected","lessThan":"3.7.2","versionType":"git"},{"version":"4.0.0","status":"affected","lessThan":"4.2.2","versionType":"git"},{"version":"4.3.0","status":"affected","lessThan":"4.3.1","versionType":"git"}],"repo":"https://github.com/zephyrproject-rtos/zephyr"}],"references":["https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3"],"weaknesses":["CWE-787"],"ingestedAt":"2026-10-29T20:12:32.778Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/5xxx/CVE-2026-5066.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-5066","state":"PUBLISHED","datePublished":"2026-06-04T20:31:25.630Z","dateUpdated":"2026-10-15T22:10:24.916Z","assignerShortName":"zephyr","assignerOrgId":"e2e69745-5e70-4e92-8431-deb5529a81ad","dateReserved":"2026-03-27T22:19:50.768Z"},"containers":{"cna":{"title":"net: sockets: tls: Potential out-of-bounds write/read in socket_op_vtable::connect function","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"zephyrproject-rtos","product":"Zephyr","packageName":"Zephyr","defaultStatus":"unaffected","versions":[{"version":"*","status":"affected","lessThan":"3.7.2","versionType":"git"},{"version":"4.0.0","status":"affected","lessThan":"4.2.2","versionType":"git"},{"version":"4.3.0","status":"affected","lessThan":"4.3.1","versionType":"git"}],"repo":"https://github.com/zephyrproject-rtos/zephyr"}],"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":6.3,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","description":"Out-of-bounds Write","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"zephyr","orgId":"e2e69745-5e70-4e92-8431-deb5529a81ad","dateUpdated":"2026-10-15T22:10:24.916Z"},"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"swg-tools/create-cve-info"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgrc-jrf6-24f3","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-05T18:26:28.322491Z","id":"CVE-2026-5066","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-05T18:26:56.118Z"}}]}}}