Code injection in Perl FindBin::Bin via directory names
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Code execution
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA. Impact type from CWE-95.
Summary
FindBin::Bin versions from 4.0.1 before 5.4.0 for Perl build the script's directory name into a string eval without escaping quotes. A single quote in a directory name ends the literal, so the rest of the name runs as Perl code (CWE-95). An attacker who can name a directory can run code as any user who runs a script inside it. FindBin::Bin is installed only on Perl 5.40 and later, and FindBin::libs loads it.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
FindBin::Bin versions from 4.0.1 before 5.4.0 for Perl execute code from the script's directory name via a string eval. The module defines Bin by interpolating the script's directory, or the current directory for perl -e, into a single-quoted literal inside a string eval, without escaping. A single quote in any directory name ends the literal and the rest of the name is compiled as Perl code. FindBin::Bin is installed only on Perl 5.40 and later, and FindBin::libs loads it. An attacker who can name a directory can run code as any user who runs a script inside it.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FindBin-libs | 4.0.1 to before 5.4.0 | 5.4.0 | Patch available | CNA |
- FindBin-libs Vendor— Affected 4.0.1 to before 5.4.0 Fixed in 5.4.0 Patch available CNA
Remediation
Upgrade FindBin-libs to version 5.4.0.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA FindBin-libs Fixed in 5.4.0
Timeline
- 2026-11-30 Threatist record created from CVE-2026-120361
- 2026-11-30 Alias added: GHSA-vhj3-wp66-fq7r
References
Sources
- CVE-2026-120361 · CVE Program
- CVE-2026-120361 · NVD
- FIRST EPSS
- GHSA-vhj3-wp66-fq7r · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences