Skip to content
NewA calmer, faster ZeroHour

CVE-2026-120361

Code injection in Perl FindBin::Bin via directory names

CVSS
—
EPSS
—
Published
·
Modified
Analyze CVE-2026-120361 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

FindBin::Bin 4.0.1 before 5.4.0 builds Bin with a string eval that embeds the script directory, or the current directory for perl -e, in a single-quoted literal without escaping. A single quote in a directory name ends that literal so the rest is compiled as Perl. Anyone who can name a directory can run code as a user who runs a script there, including through FindBin::libs, but only on Perl 5.40 and later.

What to do: Upgrade FindBin::Bin to 5.4.0. It is installed only on Perl 5.40 and later.

ProductAffectedFixed in
FindBin::Bin4.0.1 before 5.4.05.4.0
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

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.

Weakness
CWE-95

In the news

1 story