Description
Buffer overflow in the environment variable substitution code in main.c in OSH 1.7-14 allows local users to inject arbitrary environment variables, such as LD_PRELOAD, via pathname arguments of the form "$VAR/EVAR=arg", which cause the EVAR portion to be appended to a buffer returned by a getenv function call.
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 ↗Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Operator Shell (OSH) 1.7-14 - Local Privilege Escalation EDB-1300 · local · Nov 9, 2005 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-918-1 osh - programming error Debian Security (DSA / DLA) · Mar 9, 2026
References
- 20720 vdb-entry
- osh-main-execute-code(23091) vdb-entry
- 17967 third-party-advisory
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338312
- DSA-918 vendor-advisory
- 15370 vdb-entry
- 17527 third-party-advisory
- http://pulltheplug.org/users/core/files/x_osh3.sh
- ADV-2005-2378 vdb-entry