Heap-based Buffer Overflow Affecting socat package, versions <1.8.1.2-r0


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.31% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ALPINE321-SOCAT-17722757
  • published30 Jun 2026
  • disclosed25 Jun 2026

Introduced: 25 Jun 2026

NewCVE-2026-56123  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade Alpine:3.21 socat to version 1.8.1.2-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream socat package and not the socat package as distributed by Alpine. See How to fix? for Alpine:3.21 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1