CVE-2005-4158 in Todd Miller Sudo
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.
Affects 1 product from 1 vendor. Facts below cite their sources.
Requires local access, low complexity.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Todd Miller | Sudo | 1.5.6 1.5.7 1.5.8 1.5.9 1.6 1.6.1+24 more1.6.2 1.6.3 1.6.3_p1 1.6.3_p2 1.6.3_p3 1.6.3_p4 1.6.3_p5 1.6.3_p6 1.6.3_p7 1.6.4 1.6.4_p1 1.6.4_p2 1.6.5 1.6.5_p1 1.6.5_p2 1.6.6 1.6.7 1.6.7_p5 1.6.8 1.6.8_p1 1.6.8_p5 1.6.8_p7 1.6.8_p8 1.6.8_p9 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2005-4158 |
|---|---|
| BreachSpider ID | BS-2005-GLOBAL-158767-M |
| CVSS vector | AV:L/AC:L/Au:N/C:P/I:P/A:P |
| Published | 2005-12-11 |
| Last modified | 2026-06-16 |
| Source | NVD |
Analysis AI-written, not human-reviewed
This vulnerability was disclosed in 2005. A medium severity vulnerability affects Todd Miller systems (CVE-2005-4158). Public exploit code is available. Isolate affected systems if patching is not feasible.
Vulnerability details: 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. CVSS vector: AV:L/AC:L/Au:N/C:P/I:P/A:P.
Questions
What is CVE-2005-4158?
This vulnerability was disclosed in 2005. A medium severity vulnerability affects Todd Miller systems (CVE-2005-4158). Public exploit code is available. Isolate affected systems if patching is not feasible.
What is the CVSS score for CVE-2005-4158?
CVE-2005-4158 has CVSS 4.6 (Medium). Vector: AV:L/AC:L/Au:N/C:P/I:P/A:P. EPSS: 1.1%.
Is CVE-2005-4158 actively exploited?
Public exploit available for CVE-2005-4158. Exploitation risk elevated.
How do I remediate CVE-2005-4158?
Priority: MONITOR. PSIRT: [email protected]
What systems are affected by CVE-2005-4158?
CVE-2005-4158 affects Todd Miller Sudo.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Todd Miller","product":"Sudo","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-16.