CVE-2026-120361: 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
Robert Rothenberg 30 Nov 2026 00:27 UTC
========================================================================
CVE-2026-120361 CPAN Security Group
========================================================================
CVE ID: CVE-2026-120361
Distribution: FindBin-libs
Versions: from 4.0.1 before 5.4.0
MetaCPAN: https://metacpan.org/dist/FindBin-libs
VCS Repo: https://gitlab.com/lembark/findbin-libs
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
Description
-----------
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.
Problem types
-------------
- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated
Code ('Eval Injection')
Solutions
---------
Upgrade to FindBin-libs 5.4.0 or later.
References
----------
https://metacpan.org/release/LEMBARK/FindBin-libs-v5.4.0/changes