CVE-2026-120359

FindBin::libs versions from 4.1.0 before 5.4.0 for Perl add the current directory to LD_LIBRARY_PATH with the ld_lib option

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
FindBin::libs versions from 4.1.0 before 5.4.0 for Perl add the current directory to LD_LIBRARY_PATH with the ld_lib option.

When LD_LIBRARY_PATH is unset, ld_lib sets it to the directories found followed by a trailing colon. The dynamic linker reads the empty element after it as the current directory. The option exists only in the module installed on Perl 5.40 and later.

A local attacker who can write to the working directory of a program the script runs can plant a shared library that runs as the script's user.

Analysis

AI-generated

Technical impact

FindBin::libs versions 4.1.0 through 5.3.x add the current working directory to LD_LIBRARY_PATH when the option ld_lib is used. If LD_LIBRARY_PATH is not already set, the module creates a trailing colon that the dynamic linker interprets as an empty element, which resolves to the current directory. An attacker who can write files into that directory can place a malicious shared library that will be loaded and executed with the privileges of the script’s user, allowing arbitrary code execution on the host.

Affected Systems

The bug exists in the FindBin-libs Perl module provided by LEMBARK, affecting versions 4.1.0 up to, but not including, 5.4.0. The module is only present in Perl 5.40 and later, so any installation of Perl 5.40+ that includes a vulnerable FindBin-libs package is at risk.

Risk and Exploitability

The vulnerability is local; it requires the ability to write to the script’s working directory. The EPSS score is not available, and the vulnerability is not currently listed in the CISA KEV catalog, indicating no known widespread exploitation yet. However, the change to the dynamic linker’s search path is a significant privilege elevation vector for any local user who can inject a library. The CVSS score is not provided in the data, but the impact would be considered high if successfully exploited.

Remediation

Vendor Solution

Upgrade to FindBin-libs 5.4.0 or later.


OpenCVE Recommended Actions

  • Upgrade FindBin-libs to version 5.4.0 or later.
  • If a patch is delayed, avoid using the ld_lib option or remove the script’s working directory from LD_LIBRARY_PATH by setting the variable to a safe absolute path before executing vulnerable scripts.
  • As a precaution, ensure that no writable files can be placed in the script’s working directory or restrict write permissions for the relevant users.

Generated by OpenCVE AI on November 30, 2026 at 01:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description FindBin::libs versions from 4.1.0 before 5.4.0 for Perl add the current directory to LD_LIBRARY_PATH with the ld_lib option. When LD_LIBRARY_PATH is unset, ld_lib sets it to the directories found followed by a trailing colon. The dynamic linker reads the empty element after it as the current directory. The option exists only in the module installed on Perl 5.40 and later. A local attacker who can write to the working directory of a program the script runs can plant a shared library that runs as the script's user.
Title FindBin::libs versions from 4.1.0 before 5.4.0 for Perl add the current directory to LD_LIBRARY_PATH with the ld_lib option
Weaknesses CWE-427
References

Subscriptions

No data.

Weaknesses
  • CWE-427

    Uncontrolled Search Path Element

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 30, 2026, 12:26 AM
Reserved
Nov 1, 2026, 9:57 PM
Status
Received
Published
Nov 30, 2026, 1:17 AM
Modified
Nov 30, 2026, 1:17 AM