Description
Stack-based buffer overflow in the nestlex function in nestlex.c in Socat 1.5.0.0 through 1.7.1.2 and 2.0.0-b1 through 2.0.0-b3, when bidirectional data relay is enabled, allows context-dependent attackers to execute arbitrary code via long command-line arguments.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | socat | 1.7.1.3-1 | — |
| Debian 13 | socat | 1.7.1.3-1 | — |
| Debian 12 | socat | 1.7.1.3-1 | — |
| Debian 5.0 | socat | 1.6.0.1-1+lenny1 | DSA-2090-1 |
Advisories 1
- DSA-2090-1 socat - arbitrary code execution Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://bugzilla.redhat.com/show_bug.cgi?id=620426
- http://www.dest-unreach.org/socat/download/socat-1.7.1.3.patch
- http://www.dest-unreach.org/socat/contrib/socat-secadv2.html
- http://bugs.gentoo.org/show_bug.cgi?id=330785
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591443
- DSA-2090 vendor-advisory