CVE Vulnerabilities

CVE-2025-40909

Untrusted Search Path

Published: May 30, 2025 | Modified: Sep 05, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
5.9 MODERATE
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Ubuntu
MEDIUM

Perl threads have a working directory race condition where file operations may target unintended paths.

If a directory handle is open at thread creation, the process-wide current working directory is temporarily changed in order to clone that handle for the new thread, which is visible from any third (or more) thread already running.

This may lead to unintended operations such as loading code or accessing files from unexpected locations, which a local attacker may be able to exploit.

The bug was introduced in commit 11a11ecf4bea72b17d250cfb43c897be1341861e and released in Perl version 5.13.6

Weakness

The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product’s direct control.

Affected Software

Name Vendor Start Version End Version
Red Hat Enterprise Linux 10 RedHat perl-4:5.40.2-512.2.el10_0 *
Red Hat Enterprise Linux 8 RedHat perl-4:5.26.3-423.el8_10 *
Red Hat Enterprise Linux 8 RedHat perl-4:5.26.3-423.el8_10 *
Red Hat Enterprise Linux 9 RedHat perl-4:5.32.1-481.1.el9_6 *
Red Hat Enterprise Linux 9.4 Extended Update Support RedHat perl-4:5.32.1-481.el9_4.1 *
Red Hat Discovery 2 RedHat discovery/discovery-server-rhel9:sha256:c517869dacaf4d3650310d4a52e83706e0b311d6ebb4a9b37b1c7acff5c142ec *
Perl Ubuntu focal *
Perl Ubuntu jammy *
Perl Ubuntu noble *
Perl Ubuntu oracular *
Perl Ubuntu plucky *
Perl Ubuntu upstream *

Extended Description

This might allow attackers to execute their own programs, access unauthorized data files, or modify configuration in unexpected ways. If the product uses a search path to locate critical resources such as programs, then an attacker could modify that search path to point to a malicious program, which the targeted product would then execute. The problem extends to any type of critical resource that the product trusts. Some of the most common variants of untrusted search path are:

Potential Mitigations

References