# 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.

- **Severity:** Critical 9.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Jun 2026
- **Updated:** 14 Jul 2026
- **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, OESA-2026-2942, OESA-2026-2943, UBUNTU-CVE-2026-56123, openSUSE-SU-2026:11151-1

## 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 (Heap-based Buffer Overflow)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `socat` | openSUSE:Tumbleweed | All versions | 1.8.1.3-1.1 |

Products: Dest-Unreach Socat.

## How do I fix CVE-2026-56123?

Apply the vendor's patch.

## 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

- [CVE-2015-1379](https://insights.sbomify.com/CVE-2015-1379/): Denial of service in n/a (high 7.5)
- [CVE-2010-2799](https://insights.sbomify.com/CVE-2010-2799/): Memory corruption in n/a (medium 6.8)
- [CVE-2012-0219](https://insights.sbomify.com/CVE-2012-0219/): Memory corruption in n/a (medium 6.2)
- [CVE-2016-2217](https://insights.sbomify.com/CVE-2016-2217/): Weak cryptography in n/a (medium 5.3)
- [CVE-2013-3571](https://insights.sbomify.com/CVE-2013-3571/): Denial of service in n/a (low 2.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-56123 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-56123 in the wild and no public exploit code.

Affected product: socat. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-56123/ (Markdown: https://insights.sbomify.com/CVE-2026-56123/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-56123
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-56123
- OSV: https://osv.dev/vulnerability/CVE-2026-56123

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-56123/
Summaries are generated and may contain mistakes; the official description above is the record.
