Security Advisories (17)
CVE-2020-12723 (2020-06-05)

regcomp.c in Perl before 5.30.3 allows a buffer overflow via a crafted regular expression because of recursive S_study_chunk calls.

CVE-2020-10878 (2020-06-05)

Perl before 5.30.3 has an integer overflow related to mishandling of a "PL_regkind[OP(n)] == NOTHING" situation. A crafted regular expression could lead to malformed bytecode with a possibility of instruction injection.

CVE-2020-10543 (2020-06-05)

Perl before 5.30.3 on 32-bit platforms allows a heap-based buffer overflow because nested regular expression quantifiers have an integer overflow.

CVE-2018-6798 (2018-04-17)

An issue was discovered in Perl 5.22 through 5.26. Matching a crafted locale dependent regular expression can cause a heap-based buffer over-read and potentially information disclosure.

CVE-2018-6797 (2018-04-17)

An issue was discovered in Perl 5.18 through 5.26. A crafted regular expression can cause a heap-based buffer overflow, with control over the bytes written.

CVE-2018-6913 (2018-04-17)

Heap-based buffer overflow in the pack function in Perl before 5.26.2 allows context-dependent attackers to execute arbitrary code via a large item count.

CVE-2018-18314 (2018-12-07)

Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations.

CVE-2018-18313 (2018-12-07)

Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive information from process memory.

CVE-2018-18312 (2018-12-05)

Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid write operations.

CVE-2018-18311 (2018-12-07)

Perl before 5.26.3 and 5.28.x before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid write operations.

CVE-2017-12883 (2017-09-19)

Buffer overflow in the S_grok_bslash_N function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 allows remote attackers to disclose sensitive information or cause a denial of service (application crash) via a crafted regular expression with an invalid '\\N{U+...}' escape.

CVE-2017-12837 (2017-09-19)

Heap-based buffer overflow in the S_regatom function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 allows remote attackers to cause a denial of service (out-of-bounds write) via a regular expression with a '\\N{}' escape and the case-insensitive modifier.

CVE-2017-12814 (2017-09-28)

Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 on Windows allows attackers to execute arbitrary code via a long environment variable.

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.

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

NAME

perldelta - what is new for perl v5.24.1

DESCRIPTION

This document describes differences between the 5.24.0 release and the 5.24.1 release.

If you are upgrading from an earlier release such as 5.22.0, first read perl5240delta, which describes differences between 5.22.0 and 5.24.0.

Security

-Di switch is now required for PerlIO debugging output

Previously PerlIO debugging output would be sent to the file specified by the PERLIO_DEBUG environment variable if perl wasn't running setuid and the -T or -t switches hadn't been parsed yet.

If perl performed output at a point where it hadn't yet parsed its switches this could result in perl creating or overwriting the file named by PERLIO_DEBUG even when the -T switch had been supplied.

Perl now requires the -Di switch to produce PerlIO debugging output. By default this is written to stderr, but can optionally be redirected to a file by setting the PERLIO_DEBUG environment variable.

If perl is running setuid or the -T switch was supplied PERLIO_DEBUG is ignored and the debugging output is sent to stderr as for any other -D switch.

Core modules and tools no longer search "." for optional modules

The tools and many modules supplied in core no longer search the default current directory entry in @INC for optional modules. For example, Storable will remove the final "." from @INC before trying to load Log::Agent.

This prevents an attacker injecting an optional module into a process run by another user where the current directory is writable by the attacker, e.g. the /tmp directory.

In most cases this removal should not cause problems, but difficulties were encountered with base, which treats every module name supplied as optional. These difficulties have not yet been resolved, so for this release there are no changes to base. We hope to have a fix for base in Perl 5.24.2.

To protect your own code from this attack, either remove the default "." entry from @INC at the start of your script, so:

#!/usr/bin/perl
use strict;
...

becomes:

#!/usr/bin/perl
BEGIN { pop @INC if $INC[-1] eq '.' }
use strict;
...

or for modules, remove "." from a localized @INC, so:

my $can_foo = eval { require Foo; }

becomes:

my $can_foo = eval {
    local @INC = @INC;
    pop @INC if $INC[-1] eq '.';
    require Foo;
};

Incompatible Changes

Other than the security changes above there are no changes intentionally incompatible with Perl 5.24.0. If any exist, they are bugs, and we request that you submit a report. See "Reporting Bugs" below.

Modules and Pragmata

Updated Modules and Pragmata

  • Archive::Tar has been upgraded from version 2.04 to 2.04_01.

  • bignum has been upgraded from version 0.42 to 0.42_01.

  • CPAN has been upgraded from version 2.11 to 2.11_01.

  • Digest has been upgraded from version 1.17 to 1.17_01.

  • Digest::SHA has been upgraded from version 5.95 to 5.95_01.

  • Encode has been upgraded from version 2.80 to 2.80_01.

  • ExtUtils::MakeMaker has been upgraded from version 7.10_01 to 7.10_02.

  • File::Fetch has been upgraded from version 0.48 to 0.48_01.

  • File::Spec has been upgraded from version 3.63 to 3.63_01.

  • HTTP::Tiny has been upgraded from version 0.056 to 0.056_001.

  • IO has been upgraded from version 1.36 to 1.36_01.

  • The IO-Compress modules have been upgraded from version 2.069 to 2.069_001.

  • IPC::Cmd has been upgraded from version 0.92 to 0.92_01.

  • JSON::PP has been upgraded from version 2.27300 to 2.27300_01.

  • Locale::Maketext has been upgraded from version 1.26 to 1.26_01.

  • Locale::Maketext::Simple has been upgraded from version 0.21 to 0.21_01.

  • Memoize has been upgraded from version 1.03 to 1.03_01.

  • Module::CoreList has been upgraded from version 5.20160506 to 5.20170114_24.

  • Net::Ping has been upgraded from version 2.43 to 2.43_01.

  • Parse::CPAN::Meta has been upgraded from version 1.4417 to 1.4417_001.

  • Pod::Html has been upgraded from version 1.22 to 1.2201.

  • Pod::Perldoc has been upgraded from version 3.25_02 to 3.25_03.

  • Storable has been upgraded from version 2.56 to 2.56_01.

  • Sys::Syslog has been upgraded from version 0.33 to 0.33_01.

  • Test has been upgraded from version 1.28 to 1.28_01.

  • Test::Harness has been upgraded from version 3.36 to 3.36_01.

  • XSLoader has been upgraded from version 0.21 to 0.22, fixing a security hole in which binary files could be loaded from a path outside of @INC. [perl #128528]

Documentation

Changes to Existing Documentation

perlapio

  • The documentation of PERLIO_DEBUG has been updated.

perlrun

  • The new -Di switch has been documented, and the documentation of PERLIO_DEBUG has been updated.

Testing

  • A new test script, t/run/switchDx.t, has been added to test that the new -Di switch is working correctly.

Selected Bug Fixes

  • The change to hashbang redirection introduced in Perl 5.24.0, whereby perl would redirect to another interpreter (Perl 6) if it found a hashbang path which contains "perl" followed by "6", has been reverted because it broke in cases such as #!/opt/perl64/bin/perl.

Acknowledgements

Perl 5.24.1 represents approximately 8 months of development since Perl 5.24.0 and contains approximately 8,100 lines of changes across 240 files from 18 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 2,200 lines of changes to 170 .pm, .t, .c and .h files.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.24.1:

Aaron Crane, Alex Vandiver, Aristotle Pagaltzis, Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Father Chrysostomos, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Leon Timmermans, Matthew Horsfall, Ricardo Signes, Sawyer X, Sébastien Aperghis-Tramoni, Stevan Little, Steve Hay, Tony Cook.

The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.

Reporting Bugs

If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the Perl bug database at https://rt.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue.

SEE ALSO

The Changes file for an explanation of how to view exhaustive details on what changed.

The INSTALL file for how to build Perl.

The README file for general stuff.

The Artistic and Copying files for copyright information.