Security Advisories (20)
CVE-2016-6185 (2016-08-02)

The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which might allow local users to execute arbitrary code via a Trojan horse library under the current working directory.

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-2015-8853 (2016-05-25)

The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl before 5.24.0 allow context-dependent attackers to cause a denial of service (infinite loop) via crafted utf-8 data, as demonstrated by "a\x80."

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

CVE-2016-1238 (2016-08-02)

(1) cpan/Archive-Tar/bin/ptar, (2) cpan/Archive-Tar/bin/ptardiff, (3) cpan/Archive-Tar/bin/ptargrep, (4) cpan/CPAN/scripts/cpan, (5) cpan/Digest-SHA/shasum, (6) cpan/Encode/bin/enc2xs, (7) cpan/Encode/bin/encguess, (8) cpan/Encode/bin/piconv, (9) cpan/Encode/bin/ucmlint, (10) cpan/Encode/bin/unidump, (11) cpan/ExtUtils-MakeMaker/bin/instmodsh, (12) cpan/IO-Compress/bin/zipdetails, (13) cpan/JSON-PP/bin/json_pp, (14) cpan/Test-Harness/bin/prove, (15) dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp, (16) dist/Module-CoreList/corelist, (17) ext/Pod-Html/bin/pod2html, (18) utils/c2ph.PL, (19) utils/h2ph.PL, (20) utils/h2xs.PL, (21) utils/libnetcfg.PL, (22) utils/perlbug.PL, (23) utils/perldoc.PL, (24) utils/perlivp.PL, and (25) utils/splain.PL in Perl 5.x before 5.22.3-RC2 and 5.24 before 5.24.1-RC2 do not properly remove . (period) characters from the end of the includes directory array, which might allow local users to gain privileges via a Trojan horse module under the current working directory.

CVE-2015-8608 (2017-02-07)

The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of-bounds read) and possibly execute arbitrary code via a crafted (1) drive letter or (2) pInName argument.

NAME

perldelta - what is new for perl v5.22.1

DESCRIPTION

This document describes differences between the 5.22.0 release and the 5.22.1 release.

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

Incompatible Changes

There are no changes intentionally incompatible with 5.20.0 other than the following single exception, which we deemed to be a sensible change to make in order to get the new \b{wb} and (in particular) \b{sb} features sane before people decided they're worthless because of bugs in their Perl 5.22.0 implementation and avoided them in the future. If any others exist, they are bugs, and we request that you submit a report. See "Reporting Bugs" below.

Bounds Checking Constructs

Several bugs, including a segmentation fault, have been fixed with the bounds checking constructs (introduced in Perl 5.22) \b{gcb}, \b{sb}, \b{wb}, \B{gcb}, \B{sb}, and \B{wb}. All the \B{} ones now match an empty string; none of the \b{} ones do. [perl #126319]

Modules and Pragmata

Updated Modules and Pragmata

  • Module::CoreList has been upgraded from version 5.20150520 to 5.20151202.

  • PerlIO::scalar has been upgraded from version 0.22 to 0.23.

  • POSIX has been upgraded from version 1.53 to 1.53_01.

    If POSIX::strerror was passed $! as its argument then it accidentally cleared $!. This has been fixed. [perl #126229]

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

  • warnings has been upgraded from version 1.32 to 1.34.

    The warnings::enabled example now actually uses warnings::enabled. [perl #126051]

  • Win32 has been upgraded from version 0.51 to 0.52.

    This has been updated for Windows 8.1, 10 and 2012 R2 Server.

Documentation

Changes to Existing Documentation

perltie

  • The usage of FIRSTKEY and NEXTKEY has been clarified.

perlvar

  • The specific true value of $!{E...} is now documented, noting that it is subject to change and not guaranteed.

Diagnostics

The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

Changes to Existing Diagnostics

  • The printf and sprintf builtins are now more careful about the warnings they emit: argument reordering now disables the "redundant argument" warning in all cases. [perl #125469]

Configuration and Compilation

  • Using the NO_HASH_SEED define in combination with the default hash algorithm PERL_HASH_FUNC_ONE_AT_A_TIME_HARD resulted in a fatal error while compiling the interpreter, since Perl 5.17.10. This has been fixed.

  • Configuring with ccflags containing quotes (e.g. -Accflags='-DAPPLLIB_EXP=\"/usr/libperl\"') was broken in Perl 5.22.0 but has now been fixed again. [perl #125314]

Platform Support

Platform-Specific Notes

IRIX
  • Under some circumstances IRIX stdio fgetc() and fread() set the errno to ENOENT, which made no sense according to either IRIX or POSIX docs. Errno is now cleared in such cases. [perl #123977]

  • Problems when multiplying long doubles by infinity have been fixed. [perl #126396]

  • All tests pass now on IRIX with the default build configuration.

Selected Bug Fixes

  • qr/(?[ () ])/ no longer segfaults, giving a syntax error message instead. [perl #125805]

  • Regular expression possessive quantifier Perl 5.20 regression now fixed. qr/PAT{min,max}+/ is supposed to behave identically to qr/(?>PAT{min,max})/. Since Perl 5.20, this didn't work if min and max were equal. [perl #125825]

  • Certain syntax errors in "Extended Bracketed Character Classes" in perlrecharclass caused panics instead of the proper error message. This has now been fixed. [perl #126481]

  • BEGIN <> no longer segfaults and properly produces an error message. [perl #125341]

  • A regression from Perl 5.20 has been fixed, in which some syntax errors in (?[...]) constructs within regular expression patterns could cause a segfault instead of a proper error message. [perl #126180]

  • Another problem with (?[...]) constructs has been fixed wherein things like \c] could cause panics. [perl #126181]

  • In Perl 5.22.0, the logic changed when parsing a numeric parameter to the -C option, such that the successfully parsed number was not saved as the option value if it parsed to the end of the argument. [perl #125381]

  • Warning fatality is now ignored when rewinding the stack. This prevents infinite recursion when the now fatal error also causes rewinding of the stack. [perl #123398]

  • A crash with %::=(); J->${\"::"} has been fixed. [perl #125541]

  • Nested quantifiers such as /.{1}??/ should cause perl to throw a fatal error, but were being silently accepted since Perl 5.20.0. This has been fixed. [perl #126253]

  • Regular expression sequences such as /(?i/ (and similarly with other recognized flags or combination of flags) should cause perl to throw a fatal error, but were being silently accepted since Perl 5.18.0. This has been fixed. [perl #126178]

  • A bug in hexadecimal floating point literal support meant that high-order bits could be lost in cases where mantissa overflow was caused by too many trailing zeros in the fractional part. This has been fixed. [perl #126582]

  • Another hexadecimal floating point bug, causing low-order bits to be lost in cases where the last hexadecimal digit of the mantissa has bits straddling the limit of the number of bits allowed for the mantissa, has also been fixed. [perl #126586]

  • Further hexadecimal floating point bugs have been fixed: In some circumstances, the %a format specifier could variously lose the sign of the negative zero, fail to display zeros after the radix point with the requested precision, or even lose the radix point after the leftmost hexadecimal digit completely.

Acknowledgements

Perl 5.22.1 represents approximately 6 months of development since Perl 5.22.0 and contains approximately 19,000 lines of changes across 130 files from 27 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 1,700 lines of changes to 43 .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.22.1:

Aaron Crane, Abigail, Andy Broad, Aristotle Pagaltzis, Chase Whitener, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Mitchell, Father Chrysostomos, Herbert Breunung, Hugo van der Sanden, James E Keenan, Jan Dubois, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Lukas Mai, Matthew Horsfall, Peter Martini, Rafael Garcia-Suarez, Ricardo Signes, Shlomi Fish, Sisyphus, Steve Hay, Tony Cook, Victor Adam.

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 please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

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.