Security Advisories (5)
CVE-2023-47038 (2023-10-30)

A crafted regular expression when compiled by perl 5.30.0 through 5.38.0 can cause a one attacker controlled byte buffer overflow in a heap allocated buffer

CVE-2023-47100

In Perl before 5.38.2, S_parse_uniprop_string in regcomp.c can write to unallocated space because a property name associated with a \p{...} regular expression construct is mishandled. The earliest affected version is 5.30.0.

CVE-2024-56406 (2025-04-13)

A heap buffer overflow vulnerability was discovered in Perl. When there are non-ASCII bytes in the left-hand-side of the `tr` operator, `S_do_trans_invmap` can overflow the destination pointer `d`.    $ perl -e '$_ = "\x{FF}" x 1000000; tr/\xFF/\x{100}/;'    Segmentation fault (core dumped) It is believed that this vulnerability can enable Denial of Service and possibly Code Execution attacks on platforms that lack sufficient defenses.

CVE-2025-40909 (2025-05-30)

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

CVE-2023-47039 (2023-10-30)

Perl for Windows relies on the system path environment variable to find the shell (cmd.exe). When running an executable which uses Windows Perl interpreter, Perl attempts to find and execute cmd.exe within the operating system. However, due to path search order issues, Perl initially looks for cmd.exe in the current working directory. An attacker with limited privileges can exploit this behavior by placing cmd.exe in locations with weak permissions, such as C:\ProgramData. By doing so, when an administrator attempts to use this executable from these compromised locations, arbitrary code can be executed.

NAME

File::Spec::VMS - methods for VMS file specs

SYNOPSIS

require File::Spec::VMS; # Done internally by File::Spec if needed

DESCRIPTION

See File::Spec::Unix for a documentation of the methods provided there. This package overrides the implementation of these methods, not the semantics.

The default behavior is to allow either VMS or Unix syntax on input and to return VMS syntax on output unless Unix syntax has been explicitly requested via the DECC$FILENAME_UNIX_REPORT CRTL feature.

canonpath (override)

Removes redundant portions of file specifications and returns results in native syntax unless Unix filename reporting has been enabled.

catdir (override)

Concatenates a list of file specifications, and returns the result as a native directory specification unless the Unix filename reporting feature has been enabled. No check is made for "impossible" cases (e.g. elements other than the first being absolute filespecs).

catfile (override)

Concatenates a list of directory specifications with a filename specification to build a path.

curdir (override)

Returns a string representation of the current directory: '[]' or '.'

devnull (override)

Returns a string representation of the null device: '_NLA0:' or '/dev/null'

rootdir (override)

Returns a string representation of the root directory: 'SYS$DISK:[000000]' or '/'

tmpdir (override)

Returns a string representation of the first writable directory from the following list or '' if none are writable:

/tmp if C<DECC$FILENAME_UNIX_REPORT> is enabled.
sys$scratch:
$ENV{TMPDIR}

If running under taint mode, and if $ENV{TMPDIR} is tainted, it is not used.

updir (override)

Returns a string representation of the parent directory: '[-]' or '..'

case_tolerant (override)

VMS file specification syntax is case-tolerant.

path (override)

Translate logical name DCL$PATH as a searchlist, rather than trying to split string value of $ENV{'PATH'}.

file_name_is_absolute (override)

Checks for VMS directory spec as well as Unix separators.

splitpath (override)
($volume,$directories,$file) = File::Spec->splitpath( $path );
($volume,$directories,$file) = File::Spec->splitpath( $path,
                                                      $no_file );

Passing a true value for $no_file indicates that the path being split only contains directory components, even on systems where you can usually (when not supporting a foreign syntax) tell the difference between directories and files at a glance.

splitdir (override)

Split a directory specification into the components.

catpath (override)

Construct a complete filespec.

abs2rel (override)

Attempt to convert an absolute file specification to a relative specification.

rel2abs (override)

Return an absolute file specification from a relative one.

COPYRIGHT

Copyright (c) 2004-14 by the Perl 5 Porters. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

See File::Spec and File::Spec::Unix. This package overrides the implementation of these methods, not the semantics.

An explanation of VMS file specs can be found at http://h71000.www7.hp.com/doc/731FINAL/4506/4506pro_014.html#apps_locating_naming_files.