CVE-2026-56123

socat 1.8.0.0 - 1.8.1.1 Heap Buffer Overflow via SOCKS5 Reply Parser

Published Jun 25, 2026 CVSS 4.0 · 9.2 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

This vulnerability manifests as a heap‑based buffer overflow triggered by a sign‑extension flaw in the SOCKS5 domain name reply parser. A malicious SOCKS5 proxy can supply a domain name length that, when read into a signed char, produces a negative value converted to an unsigned size_t, allowing an attacker to write beyond the 262‑byte reply buffer and corrupt adjacent heap memory. The consequence is uncontrolled memory corruption that could lead to arbitrary code execution or a crash, as defined by CWE‑122.

Affected Systems

All releases of socat from 1.8.0.0 through 1.8.1.1 are affected. The vulnerability exists in the standard socat binary distributed by the socat project. Users of these versions should verify the currently installed release number.

Risk and Exploitability

The CVSS score of 9.2 indicates critical severity, and although an EPSS score is not available, the known ability to trigger the overflow via a remote SOCKS5 server makes the risk high for services that rely on socat for proxying. The vulnerability is not listed in the CISA KEV catalog, but its remote nature and high severity would make it a priority for immediate remediation. Attackers would need control over a SOCKS5 proxy that a socat user connects to, and could then send crafted replies to corrupt memory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade socat to version 1.8.1.2 or later, which removes the sign‑extension bug.
  • If an upgrade is not immediately possible, disable or restrict socat’s SOCKS5 support by using alternative proxy mechanisms or by configuring the application to only use trusted proxies.
  • Employ network controls to block unsolicited SOCKS5 traffic and monitor for anomalous domain length values in socat logs.

Generated by OpenCVE AI on June 25, 2026 at 18:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8511-1 socat vulnerabilities
History
Type Values Removed Values Added
First Time appeared Dest-unreach
Dest-unreach socat
CPEs cpe:2.3:a:dest-unreach:socat:*:*:*:*:*:*:*:*
Vendors & Products Dest-unreach
Dest-unreach socat
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Socat
Socat socat
Vendors & Products Socat
Socat socat
Type Values Removed Values Added
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.
Title socat 1.8.0.0 - 1.8.1.1 Heap Buffer Overflow via SOCKS5 Reply Parser
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 14, 2026, 9:34 PM
Reserved
Jun 18, 2026, 7:15 PM
Status
Analyzed
Published
Jun 25, 2026, 5:17 PM
Modified
Jun 26, 2026, 4:50 PM