Security Advisories (23)
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-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-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-2026-4176 (2026-03-29)

Perl versions from 5.9.4 before 5.40.4-RC1, from 5.41.0 before 5.42.2-RC1, from 5.43.0 before 5.43.9 contain a vulnerable version of Compress::Raw::Zlib. Compress::Raw::Zlib is included in the Perl package as a dual-life core module, and is vulnerable to CVE-2026-3381 due to a vendored version of zlib which has several vulnerabilities, including CVE-2026-27171. The bundled Compress::Raw::Zlib was updated to version 2.221 in Perl blead commit c75ae9cc164205e1b6d6dbd57bd2c65c8593fe94.

CVE-2026-19487 (2026-08-13)

Perl versions from 5.9.4 before 5.41.9 produce incorrect regular expression match results when a stale failure flag ends the Aho-Corasick prescan early in S_find_byclass. The prescan walks the subject for positions where the full pattern could match, and the engine tries it from the leftmost one recorded. A failing transition sets the failed flag, and a later successful transition does not clear it, so the prescan reads the stale flag as a failure and stops before it can record a candidate that starts earlier. It takes a subject where one candidate is recorded and a later character then forces a fallback through a fail link that succeeds. Example: "ABCDE" =~ m/ABCF|BCDE|C/; # matches C at offset 2, not BCDE "ABCDE" =~ m/ABCF|BCDE|C(G)/; # no match, BCDE missed An alternation like this can miss input it should match, or match it on the wrong branch, so an access or filtering decision made from the result can be wrong.

CVE-2026-57432 (2026-07-13)

Perl versions through 5.43.10 have an integer overflow in S_measure_struct leading to an out-of-bounds heap read in pack and unpack. S_measure_struct adds each item's size times its repeat count to a running total with no overflow check, so a large repeat count in a pack or unpack template wraps the signed SSize_t total negative. The @, X, and x position codes then guard their moves with a signed length comparison that passes when the length is negative, advancing the buffer pointer out of bounds. A template derived from untrusted input can read heap memory past the buffer and return it to the caller.

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-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-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-2026-13221 (2026-07-13)

Perl versions through 5.43.9 produce silently incorrect regular expression matches when an alternation of more than 65535 fixed string branches is compiled into a trie in Perl_study_chunk. When such branches are combined into a trie, the delta between the first branch and the shared tail is stored in a 16-bit field. A branch count above 65535 overflows the field, and the trie's match decision table is truncated with no warning or error. A pattern of this shape produces false positive matches (matching strings it should not) and false negative matches (failing to match strings it should). When such a pattern gates an access or filtering decision, the result is wrong.

CVE-2026-15534 (2026-08-09)

Perl versions through 5.45.1 have out-of-bounds heap reads and writes during regular expression matching via an undersized superlinear cache in S_regmatch. The regex engine's superlinear cache holds one bit per subject position for each participating WHILEM node, so the bit count is the subject length plus one times the number of nodes. Nothing checks that product for positive overflow of the signed 32-bit count: a 286331153 byte subject matched against a pattern with 15 participating nodes stores the count as 14, leaving a two byte cache. The cache is then indexed from the real match position and node number, so reads go past the end of the allocation, and on failure CACHEsayNO sets a bit past it. A caller that matches an attacker controlled subject of this size against a pattern of this shape can crash the process or corrupt heap memory.

CVE-2026-8376 (2026-05-25)

Perl versions through 5.43.10 have a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds. Perl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. For a quantified fixed substring with a large minimum count, the byte length mincount * l could overflow SSize_t, producing an undersized SvGROW allocation; the subsequent copy writes past the end of the buffer. A caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time.

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-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.

NAME

gcc - GNU project C and C++ compiler

C++ NOTES

Other mentions of C++. ### .SH "NAME" gcc \- GNU project "C" and C++ compiler .SH "\*(C+ NOTES" .IX Header " NOTES" Other mentions of \*(C+. ###

### =head1 PERIODS

This . should be quoted. ### .SH "PERIODS" .IX Header "PERIODS" This \f(CW\*(C`.\*(C'\fR should be quoted. ###

### =over 4

  • A bullet.

  • Another bullet.

  • Also a bullet.

### =encoding iso-8859-1

ACCENTS

Beyoncé! Beyoncé! Beyoncé!!

Beyoncé!  Beyoncé!
  Beyoncé!  Beyoncé!
    Beyoncé!  Beyoncé!

Older versions didn't convert Beyoncé in verbatim. ### .SH "ACCENTS" .IX Header "ACCENTS" Beyonce\*'! Beyonce\*'! Beyonce\*'!! .PP .Vb 3 \& Beyonce\*'! Beyonce\*'! \& Beyonce\*'! Beyonce\*'! \& Beyonce\*'! Beyonce\*'! .Ve .PP Older versions didn't convert Beyonce\*' in verbatim. ###

### =over 4

1. Not a number
2. Spaced right
1 Not a number
2 Spaced right

### =over 4

*

Not bullet.

### =head1 SEQS

"=over ... =back"

"S<...>"

The quotes should be converted in the above to paired quotes. ### .SH "SEQS" .IX Header "SEQS" \&\*(L"=over ... =back\*(R" .PP \&\*(L"...\*(R" .PP The quotes should be converted in the above to paired quotes. ###

### =head1 YEN

It cost me ¥12345! That should be an X. ### .SH "YEN" .IX Header "YEN" It cost me X12345! That should be an X. ###

### =head1 agrave

Open à la shell. Previous versions mapped it wrong. ### .SH "agrave" .IX Header "agrave" Open a\*` la shell. Previous versions mapped it wrong. ###

### =over

First level

Blah blah blah....

  • Should be a bullet.

### =over 4

1. Check fonts in @CARP_NOT test.

### =head1 LINK QUOTING

There should not be double quotes: (?>pattern). ### .SH "LINK QUOTING" .IX Header "LINK QUOTING" There should not be double quotes: \f(CW\*(C`(?>pattern)\*(C'\fR. ###

### =head1 S<> MAGIC

Magic should be applied RISC OS to that. ### .SH " MAGIC" .IX Header " MAGIC" Magic should be applied \s-1RISC\s0\ \s-1OS\s0 to that. ###

### =head1 MAGIC MONEY

These should be identical.

Bippity boppity boo "The price is $100."

Bippity boppity boo "The price is $100." ### .SH "MAGIC MONEY" .IX Header "MAGIC MONEY" These should be identical. .PP Bippity boppity boo \*(L"The price is \f(CW$100\fR.\*(R" .PP Bippity boppity boo \*(L"The price is \f(CW$100\fR.\*(R" ###

### =head1 NAME

"Stuff" (no guesswork)

THINGS

Oboy, is this C++ "fun" yet! (guesswork) ### .SH "NAME" "Stuff" (no guesswork) .SS "\s-1THINGS\s0" .IX Subsection "THINGS" Oboy, is this \*(C+ \*(L"fun\*(R" yet! (guesswork) ###

### =head1 Newline C Quote Weirdness

Blorp ' ''. Yes. ### .SH "Newline C Quote Weirdness" .IX Header "Newline C Quote Weirdness" Blorp \f(CW\*(Aq \&\*(Aq\*(Aq\fR. Yes. ###

### =head1 Soft Hypen Testing

sig­action manu­script Jark­ko Hie­ta­nie­mi

And again:

sig­action manu­script Jark­ko Hie­ta­nie­mi

And one more time:

sig­action manu­script Jark­ko Hie­ta­nie­mi ### .SH "Soft Hypen Testing" .IX Header "Soft Hypen Testing" sig\%action manu\%script Jark\%ko Hie\%ta\%nie\%mi .PP And again: .PP sig\%action manu\%script Jark\%ko Hie\%ta\%nie\%mi .PP And one more time: .PP sig\%action manu\%script Jark\%ko Hie\%ta\%nie\%mi ###

### =head1 X<> Whitespace

Blorpy prok wugga chachacha. ### .SH " Whitespace" .IX Header " Whitespace" Blorpy \fBprok\fR wugga chachacha. .IX Xref "bivav" ###

### =head1 Hyphen in S<>

Don't transform even-this hyphen. This "one's-fine!", as well. However, $-0.13 should have a real hyphen. ### .SH "Hyphen in " .IX Header "Hyphen in " Don't transform\ even-this\ hyphen. This \*(L"one's-fine!\*(R", as well. However, $\-0.13 should have a real hyphen. ###

### =head1 Quote escaping

Don't escape `this' but do escape `this' (and don't surround it in quotes). ### .SH "Quote escaping" .IX Header "Quote escaping" Don't escape `this' but do escape \f(CW\`this\*(Aq\fR (and don't surround it in quotes). ###

### =pod

ð ### .PP \&\*(d- ###

### =head1 one and two ### .ie n .SH """one"" and ""two""" .el .SH "\f(CWone\fP and \f(CWtwo\fP" .IX Header "one and two" ###

### =pod

Some text.

Stuff that's hidden.

More text. ### Some text. Some raw nroff. \fBBold text.\fP \fIItalic text.\fP .PP \&A paragraph. .PP More text. ###

### =head1 NAME

test - test ### .SH "NAME" test \- "test" ###

### =head1 INDEX

Index entry matching a whitespace escape. ### .SH "INDEX" .IX Header "INDEX" Index entry matching a whitespace escape. .IX Xref "\\n" ###

### =head1 LINK TO URL

This is a link to a URL. ### .SH "LINK TO URL" .IX Header "LINK TO URL" This is a link <http://www.example.com/> to a \s-1URL.\s0 ###

### =head1 NAME

test - test italics file ### .SH "NAME" test \- test italics file ###

### =head1 TRAILING SPACE

Hello

world

. ### .SH "TRAILING SPACE" .IX Header "TRAILING SPACE" Hello\ .PP world\ \ \ .PP \&. ###

### =head1 URL LINK

The newest version of this document is also available on the World Wide Web at http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod. ### .SH "URL LINK" .IX Header "URL LINK" The newest version of this document is also available on the World Wide Web at <http://pod.tst.eu/http://cvs.schmorp.de/rxvt\-unicode/doc/rxvt.7.pod>. ###

### =head1 RT LINK

[perl #12345] ### .SH "RT LINK" .IX Header "RT LINK" [perl #12345] <https://rt.cpan.org/12345> ###

### =head1 Multiline X<>

Something something ### .SH "Multiline " .IX Header "Multiline " Something something .IX Xref "this is one index term" ###

### =head1 Uppercase License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### .SH "Uppercase License" .IX Header "Uppercase License" \&\s-1THE SOFTWARE IS PROVIDED \*(L"AS IS\*(R", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\s0 ###

### =head1 Fixed-width Fonts in =item

The nroff portion should not use fixed-width fonts. In podlators 4.06 and earlier, italic was terminated with \f(CW, which didn't properly stop italic.

tar option... [name]...
tar letter... [argument]... [option]... [name]...

11 POD Errors

The following errors were encountered while parsing the POD:

Around line 102:

'=item' outside of any '=over'

Around line 112:

=back doesn't take any parameters, but you said =back ### .IP "\(bu" 4 A bullet. .IP "\(bu" 4 Another bullet. .IP "\(bu" 4 Also a bullet. ###

Around line 151:

'=item' outside of any '=over'

Around line 163:

=back doesn't take any parameters, but you said =back ### .IP "1. Not a number" 4 .IX Item "1. Not a number" .PD 0 .IP "2. Spaced right" 4 .IX Item "2. Spaced right" .IP "1 Not a number" 2 .IX Item "1 Not a number" .IP "2 Spaced right" 2 .IX Item "2 Spaced right" ###

Around line 179:

'=item' outside of any '=over'

Around line 183:

=back doesn't take any parameters, but you said =back ### .IP "*" 4 Not bullet. ###

Around line 230:

'=item' outside of any '=over'

Around line 242:

=back doesn't take any parameters, but you said =back ### .IP "First level" 4 .IX Item "First level" Blah blah blah.... .RS 4 .IP "\(bu" 4 Should be a bullet. .RE .RS 4 .RE ###

Around line 258:

'=item' outside of any '=over'

Around line 260:

=back doesn't take any parameters, but you said =back ### .ie n .IP "1. Check fonts in @CARP_NOT test." 4 .el .IP "1. Check fonts in \f(CW@CARP_NOT\fR test." 4 .IX Item "1. Check fonts in @CARP_NOT test." ###

Around line 581:

=back doesn't take any parameters, but you said =back ### .SH "Fixed-width Fonts in =item" .IX Header "Fixed-width Fonts in =item" The nroff portion should not use fixed-width fonts. In podlators 4.06 and earlier, italic was terminated with \ef(\s-1CW,\s0 which didn't properly stop italic. .ie n .IP """tar \fIoption\fP... [\fIname\fP]...""" 2 .el .IP "\f(CWtar \f(CIoption\f(CW... [\f(CIname\f(CW]...\fR" 2 .IX Item "tar option... [name]..." .PD 0 .ie n .IP """tar \fIletter\fP... [\fIargument\fP]... [\fIoption\fP]... [\fIname\fP]...""" 2 .el .IP "\f(CWtar \f(CIletter\f(CW... [\f(CIargument\f(CW]... [\f(CIoption\f(CW]... [\f(CIname\f(CW]...\fR" 2 .IX Item "tar letter... [argument]... [option]... [name]..." ###