# CVE-2026-95822: Out-of-bounds read and kernel stack disclosure in the SOCKS5 client when the destination address family differs from the proxy address family

- **Severity:** LOW 3.3
- **CVSS:** 3.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: None
- **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.15% (percentile 2, 2026-11-28)
- **CWE:** CWE-125
- **Published:** 2026-11-17T19:39:10.656Z
- **Modified:** 2026-11-17T20:17:59.873Z

## Who should check

- Anyone running zephyrproject zephyr \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0

## Description

The SOCKS5 client in subsys/net/lib/socks/socks.c built the CONNECT request in socks5\_tcp\_connect() by choosing the SOCKS5 address type from the address family of the proxy (proxy-\>sa\_family) while reading the bytes out of the destination address supplied to connect(). A SOCKS5 request encodes the destination independently of the transport used to reach the proxy, so the two families are unrelated and nothing in the path forces them to agree: set\_context\_proxy() only requires the proxy family to match the socket, and zsock\_connect\_ctx() enters the SOCKS branch before any destination validation. With an IPv6 proxy and an AF\_INET destination the code treated an 8-byte struct net\_sockaddr\_in as a struct net\_sockaddr\_in6 and copied the 16-byte sin6\_addr from it, reading 12 bytes past the end of the object and transmitting them to the proxy.

With CONFIG\_USERSPACE enabled, z\_vrfy\_zsock\_connect() copies only addrlen user bytes into a stack-resident struct net\_sockaddr\_storage and enforces no per-family minimum length, so the oversized read stays within the storage but returns stale, uninitialised kernel-stack bytes. An unprivileged user-mode thread can therefore open an AF\_INET6 stream socket, point setsockopt(SO\_SOCKS5) at a proxy it controls, and call connect() with a short AF\_INET destination to have the kernel send it 12 bytes of supervisor stack residue per attempt. Without CONFIG\_USERSPACE the read runs past the end of the caller's own struct net\_sockaddr\_in, disclosing adjacent memory to the proxy; the family mismatch can arise unintentionally when a destination is obtained from DNS while an IPv6 proxy is configured.

Impact is limited to information disclosure of at most 12 bytes per connect() call, with no write primitive; the leak is delivered to whoever operates the SOCKS5 proxy. The mirrored pairing (IPv6 destination through an IPv4 proxy) is memory-safe but encoded the destination as SOCKS5\_ATYP\_IPV4 from the first four bytes of the IPv6 address, causing the proxy to connect to an unrelated host. Exploitation requires the non-default CONFIG\_SOCKS option, a socket with SO\_SOCKS5 configured, and both IPv4 and IPv6 support in the image.

The fix moves the encoding into a helper that selects the address type from dest-\>sa\_family and validates dest\_len against the matching struct net\_sockaddr\_in/struct net\_sockaddr\_in6 before copying, rejecting under-length or unsupported destinations with an error.

## Affected and fixed versions

- zephyrproject zephyr: \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0 (cvelist)

## Technologies

Zephyr RTOS

## Mitigation

- Upgrade zephyr to 4.5.0 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-95822. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-95822.md
Affected: zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0

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-95822 being exploited?

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

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

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

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

zephyrproject zephyr \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0.

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

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-95822?

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-xvvw-v57r-7rwm>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/b066e8a6ae1706cd0b3a6dbc61a5861f62944f95>

## 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-95822>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

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