CVE-2026-56123 socat 1.8.0.0 - 1.8.1.1 Heap Buffer Overflow via SOCKS5 Reply Parser
A malicious SOCKS5 proxy server can trigger a heap buffer overflow in socat, potentially allowing remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-56123?
CVE-2026-56123 is a critical memory corruption vulnerability in socat, published on 25 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
socat versions 1.8.0.0 through 1.8.1.1 contain a heap-based buffer overflow vulnerability that allows a malicious SOCKS5 proxy server to overwrite adjacent heap memory by exploiting a sign-extension flaw in the DOMAINNAME reply parser. During connection setup, the domain name length byte is read through a signed char field causing a negative bytes_to_read value that is implicitly converted to size_t, resulting in an unbounded heap write into the 262-byte reply buffer with attacker-controlled size and content.
Weakness: CWE-122
Which versions are affected by CVE-2026-56123?
It affects 1 product.
Linux distribution packages (1)
socat openSUSE:Tumbleweed | All versions | 1.8.1.3-1.1 |
Products include Dest-Unreach Socat.
How do I fix CVE-2026-56123?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-56123 being exploited?
There is no known exploitation of CVE-2026-56123 in the wild and no public exploit code.
Other vulnerabilities in socat
Sources
Also known as ALPINE-CVE-2026-56123, BELL-CVE-2026-56123, DEBIAN-CVE-2026-56123, ECHO-0d27-ed35-8289, GHSA-6r8c-w5mj-43hv, MGASA-2026-0290 and 4 more.