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

Published Nov 30, 2026
·
Updated

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.

Affected Software

5 affected components
cpan/FindBin::Bin>=4.0.1<5.4.0
debian/libfindbin-libs-perl*
debian/libfindbin-libs-perl*
debian/libfindbin-libs-perl*
debian/libfindbin-libs-perl<=3.0.2-1, <=4.0.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade FindBin-libs to a version that resolves this vulnerability.

    Fixed in 5.4.0

Event History

Nov 30, 2026
CVE Published
via MITRE·12:26 AM
Data Sourced
via MITRE·12:26 AM
RemedyDescriptionWeakness
Data Sourced
via OSV·12:26 AM
DescriptionWeakness
Data Sourced
via NVD·01:17 AM
DescriptionWeakness
Data Sourced
via OSV·07:00 AM
Affected Software

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems running Perl 5.40 or later with FindBin::Bin version 4.0.1 through versions before 5.4.0 are exposed when a script using the affected module, including through FindBin::libs, is run from a directory whose name an attacker can control.

2

What must an attacker be able to do to exploit it?

The attacker must be able to create or rename a directory so that its name contains a single quote and Perl code, then cause or wait for a user to run an affected script from within that directory. The injected code runs with the privileges of the user running the script.

3

Are one-line Perl commands affected?

Yes. For perl -e, the module uses the current directory when defining Bin, so a malicious current-directory name can trigger the same code execution.

4

What can be done before upgrading?

Avoid running affected scripts, including scripts that load FindBin::libs, from directories whose names may be attacker-controlled. Restrict untrusted users from creating or renaming directories in locations where privileged or automated Perl scripts may be executed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203