Description
Sudo before 1.6.8 p12, when the Perl taint flag is off, does not clear the (1) PERLLIB, (2) PERL5LIB, and (3) PERL5OPT environment variables, which allows limited local users to cause a Perl script to include and execute arbitrary library files that have the same name as library files that are included by the script.
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 ↗openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | sudo | 1.9.7p2-1.4 | openSUSE-SU-2024:11413-1 |
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 3
- Sudo 1.6.x - Environment Variable Handling Security Bypass (1) EDB-27056 · local · Jan 9, 2006 · verified
- Sudo 1.6.x - Environment Variable Handling Security Bypass (2) EDB-27057 · local · Jan 9, 2006 · verified
- Sudo Perl 1.6.x - Environment Variable Handling Security Bypass EDB-26498 · local · Nov 11, 2005 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- DSA-946-2 sudo - missing input sanitising Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:11413-1 sudo-1.9.7p2-1.4 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- MDKSA-2005:234 vendor-advisory
- 18549 third-party-advisory
- sudo-perl-execute-code(23102) vdb-entry
- 18558 third-party-advisory
- 2006-0002 vendor-advisory
- 18463 third-party-advisory
- 18308 third-party-advisory
- ADV-2005-2386 vdb-entry
- 15394 vdb-entry
- 18156 third-party-advisory
- 18102 third-party-advisory
- USN-235-1 vendor-advisory
- SUSE-SR:2006:002 vendor-advisory
- DSA-946 vendor-advisory
- 1015192 vdb-entry
- MDKSA-2006:159 vendor-advisory
- 21692 third-party-advisory
- http://www.sudo.ws/sudo/alerts/perl_env.html
- 17534 third-party-advisory