Home › CVE › Vulnerabilities
CVE-2026-120361
Research article
FindBin-libs for Perl: eval injection in FindBin::Bin (CVE-2026-120361), fixed in 5.4.0
| CVE | CVE-2026-120361 |
|---|---|
| Published | November 30, 2026 01:30 UTC |
| Research cut-off | November 30, 2026 01:25 UTC |
| Sources reviewed | 2: CISA KEV catalog; vendor advisory page (seclists.org) |
Executive summary
CVE-2026-120361 is an eval injection weakness (CWE-95) in the FindBin::Bin module of the FindBin-libs Perl distribution [2]. The reviewed sources contain no CVSS score or vector, so severity cannot be stated from a scoring source [2]. Versions from 4.0.1 up to but not including 5.4.0 are listed as affected [2]. An attacker must be able to create or choose a directory name, and code in that name then runs with the privileges of any user who executes a script located there [2]. The module is present in Perl 5.40 and later, where FindBin::libs loads it [2]. CISA KEV did not list the CVE as of 2026-11-30, and the bulletin reports no exploitation activity or proof of concept; neither fact rules out exploitation [1, 2]. The stated remedy is to upgrade FindBin-libs to 5.4.0 or later [2].
Key points
- CVE-2026-120361 is an eval injection weakness (CWE-95) in the FindBin::Bin module of the FindBin-libs Perl distribution, affecting 4.0.1 up to but not including 5.4.0 [2].
- A single-quote character in a directory name can end the module's evaluated string, so code in an attacker-chosen directory name can run for users who execute scripts there [2].
- The module ships with Perl 5.40 and later, where FindBin::libs loads it [2].
- The stated remedy is to upgrade FindBin-libs to 5.4.0 or later [2].
- No CVSS score is in the reviewed sources; CISA KEV did not list the CVE as of 2026-11-30 and the bulletin reports no exploitation or proof of concept [1, 2].
Vulnerability identification
| Field | Detail | Source |
|---|---|---|
| CVE ID | CVE-2026-120361 | [2] |
| Publisher of the bulletin | CPAN Security Group, covering the FindBin-libs distribution for Perl | [2] |
| Component | FindBin::Bin module, loaded by FindBin::libs | [2] |
| Platform | Perl; FindBin::Bin ships with Perl 5.40 and later | [2] |
| Weakness | CWE-95, eval injection: input is not neutralized before dynamic code evaluation | [2] |
| CVSS | No base score, vector or scoring version published in the reviewed sources | [2] |
| Record status and dates | Not in the reviewed sources | none |
| CISA KEV status | Not listed as of 2026-11-30 | [1] |
| Related references | MetaCPAN distribution page, GitLab repository for findbin-libs, MetaCPAN changes page for the v5.4.0 release | [2] |
Vulnerability description
The flaw affects how the FindBin::Bin module turns a directory path into a value. The module treats path text as code to be evaluated rather than as data, so characters in a directory name can be interpreted as Perl source [2]. The violated property is the integrity of code execution: text an attacker controls through a directory name becomes executed code [2]. An attacker who can create or choose a directory name can cause code to run for any user who executes a script located in that directory [2]. The bulletin describes no remote trigger; the triggering condition is a local user running a script from the attacker-influenced directory [2].
Root cause analysis
Confirmed [2]: the module builds its Bin value by inserting the script's directory path, or the current directory when the code is run through perl -e, into a single-quoted string inside a string eval, and it applies no escaping to that path.
Analyst assessment: the defect is that a path is passed into code text without preserving its role as data. Handling the path as a plain value, or escaping quote characters before evaluation, would prevent a quote in a directory name from ending the string. This inference is not stated in the bulletin.
Technical mechanics
- Input: the directory containing the running script, or the current directory when started with perl -e [2].
- Processing: the module places that path text into a single-quoted string that is evaluated with a string eval [2].
- Validation failure: no escaping is applied, so a single-quote character in the directory name is not neutralized [2].
- Boundary crossing: the single quote closes the string early, and the characters after it are parsed and compiled as Perl source [2].
- Execution: the compiled code runs with the privileges of the user who executes a script in that directory [2].
The control that should have prevented this is escaping or avoiding evaluation of the path (Analyst assessment). The flow above is conceptual and describes no payload.
Attack surface and exploitation prerequisites
| Prerequisite | Requirement | Source |
|---|---|---|
| Attacker capability | Create or choose a directory name that a user later uses to run a script | [2] |
| Access position | Influence over a directory path; the bulletin does not name a network or local position (Analyst assessment: local file system influence) | [2] |
| Authentication | Not stated in the bulletin | [2] |
| User interaction | A user must execute a script located in the attacker-influenced directory | [2] |
| Configuration | Perl 5.40 or later, where FindBin::Bin ships and FindBin::libs loads it | [2] |
| Privilege of executed code | The privileges of the user executing the script | [2] |
Exploitation and threat intelligence status
CISA KEV did not list CVE-2026-120361 as of 2026-11-30 [1]. That absence does not rule out exploitation [1]. The bulletin states no exploitation activity and no proof-of-concept status [2]. The reviewed sources contain no reporting of in-the-wild exploitation, so exploitation status is Unknown: it is neither confirmed nor excluded. No threat actor, campaign or sector is attributed.
Affected products and versions
| Product | Component | Affected versions | Platform | Fixed version | Source and qualification |
|---|---|---|---|---|---|
| FindBin-libs (Perl distribution) | FindBin::Bin | 4.0.1 up to but not including 5.4.0 | Perl; FindBin::Bin ships with Perl 5.40 and later | 5.4.0 | [2]; stated in the bulletin, primary CPAN record not reviewed |
Remediation
Immediate mitigation (Analyst assessment; not vendor-supplied)
- Stop launching Perl scripts from directories whose names an untrusted party could create or choose. This addresses the trigger described in [2]. It does not remove the flawed code, and scheduled tasks that rely on such directories must be relocated first. Verify by reviewing the working directories and script paths of scheduled and manual jobs.
- Restrict write access to directories from which Perl scripts are launched, so that only the responsible administrator can create entries in them [2]. Verify with the directory permission listing of each script location.
Permanent fix (vendor-stated)
Upgrade FindBin-libs to version 5.4.0 or later [2]. Confirm the installed version is 5.4.0 or later in every Perl installation on the host, using the module tooling of that Perl environment. The bulletin points to the MetaCPAN changes page for v5.4.0 as the reference for the release [2]. Upgrade prerequisites, restart requirements and rollback steps are not in the reviewed sources, so test the upgrade with the same Perl version in a staging environment before production.
Remediation checklist
- Now: inventory every host running Perl 5.40 or later and identify FindBin-libs installations, then compare each installed version against the affected range 4.0.1 up to but not including 5.4.0 [2].
- Now: list the directories from which Perl scripts are launched, including scheduled and manual jobs, and remove any launch path whose name an untrusted party could create or choose [S2, Analyst assessment].
- Now: restrict write permissions on those script-launch directories to the responsible administrator only, and verify with the directory permission listing [S2, Analyst assessment].
- Fix: upgrade FindBin-libs to version 5.4.0 or later on every affected host [2].
- Confirm the fix: check that each installed FindBin-libs reports version 5.4.0 or later using the module tooling of that Perl environment, and record the result per host [2].
- Validate before production: test the upgrade with the same Perl version in staging, because restart and rollback steps are not in the reviewed sources [S2, Analyst assessment].
- If exploitation is suspected: review the working directories and file ownership of scripts that ran from attacker-influenced directories, since the bulletin says code runs with the executing user's privileges [2].
- Consult the MetaCPAN changes page for v5.4.0 for the release notes of the fix before deployment [2].
Evidence gaps
- CVSS base score, vector and scoring version: none in the reviewed sources; the NVD or CVE record would settle this.
- NVD record status, publication date and last-modified date: the NVD record was not reviewed; reviewing it would settle this.
- Primary CPAN Security Group advisory text and date: only the bulletin was reviewed, and its date is not stated; the primary advisory would settle this.
- Behaviour on Perl releases before 5.40 when FindBin-libs is installed separately: not established; the distribution documentation or advisory would settle this.
- Whether versions below 4.0.1 are affected: not established; the advisory's full affected range or the MetaCPAN release history would settle this.
- Code change that implements the fix: not in the reviewed sources; the MetaCPAN changes page for v5.4.0 or the GitLab repository would settle this.
- Exploitation in the wild: no reporting in the reviewed sources; vendor telemetry or threat reporting would settle this.
- Public proof-of-concept code: the bulletin states none; a review of public exploit repositories would settle this.
- Indicators of compromise: none in the reviewed sources; incident reports or the vendor's detection guidance would settle this.
- EPSS score: not in the reviewed sources; the FIRST EPSS entry would settle this.
- Upgrade prerequisites, restart requirements and rollback steps: not in the reviewed sources; vendor upgrade documentation would settle this.
References
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-30. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-30.
- Vendor bulletin page (seclists.org). seclists.org. https://seclists.org/oss-sec/2026/q4/925. Accessed 2026-11-30.
Summary
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: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
References by type
Other references
Frequently asked questions
What is CVE-2026-120361?
CVE-2026-120361 is an eval injection weakness (CWE-95) in the FindBin::Bin module of the FindBin-libs Perl distribution. The reviewed sources contain no CVSS score or vector, so severity cannot be stated from a scoring source. Versions from 4.0.1 up to but not including 5.4.0 are listed as affected. Weakness type: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') (CWE-95).
How severe is CVE-2026-120361?
CVE-2026-120361 has not been given a CVSS score yet.
Is CVE-2026-120361 being exploited?
Not as far as is known: CVE-2026-120361 is not in CISA's Known Exploited Vulnerabilities catalog as of November 30, 2026.
How do I fix CVE-2026-120361?
Now: inventory every host running Perl 5.40 or later and identify FindBin-libs installations, then compare each installed version against the affected range 4.0.1 up to but not including 5.4.0. Now: list the directories from which Perl scripts are launched, including scheduled and manual jobs, and remove any launch path whose name an untrusted party could create or choose [S2, Analyst assessment]. Now: restrict write permissions on those script-launch directories to the responsible administrator only, and verify with the directory permission listing [S2, Analyst assessment].