Skip to main content

Perl CVE-2026-8376

| EUVDEUVD-2026-31772 CRITICAL
Integer Overflow to Buffer Overflow (CWE-680)
2026-05-25 CPANSec GHSA-mpxq-89h3-qc47
Critical
Disputed · 9.8 NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit attacker-controlled regex to application
  2. Delivery
    Pattern reaches Perl regex compiler
  3. Exploit
    Quantified fixed substring overflows SSize_t byte calc
  4. Execution
    Undersized SvGROW buffer allocated
  5. Persist
    Copy writes past heap buffer
  6. Impact
    Heap corruption enabling potential code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer-to-buffer conversion safety
Exploitation Conditions

Exploitation requires three concrete conditions: (1) the target runs a 32-bit Perl build (≤5.43.10) - 64-bit builds are not affected because SSize_t is wide enough to avoid the overflow; (2) an application compiles a regular expression whose content is attacker-controlled (e.g., user-supplied search/filter patterns passed to qr// or m//); and (3) the malicious pattern contains a quantified fixed substring with a very large minimum repeat count so that mincount × substring-byte-length overflows signed SSize_t. The trigger is at regex compile time, not match time. Limiting factors: the 32-bit-only requirement and the need for the host application to feed untrusted input into the Perl regex compiler. Although the CVSS vector is PR:N/UI:N (unauthenticated, no user interaction at the Perl level), real-world reachability depends entirely on whether the hosting application exposes regex compilation to untrusted input.

Impact

Signals here conflict sharply and should be weighed rather than taken at face value. The CVSS vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H = 9.8) describes a network-reachable, unauthenticated, low-complexity, high-impact flaw, but that score abstracts away two real-world gates that materially shrink the exposed population: exploitation only affects 32-bit Perl builds (64-bit builds have a wide enough SSize_t to avoid the overflow), and it requires an application that actually compiles attacker-supplied regular expressions. EPSS reflects this: 0.02% (5th percentile) indicates exploitation is assessed as very unlikely in practice. It is not in CISA KEV and no public exploit was identified at time of analysis, so this is best treated as a high-severity-but-low-immediate-likelihood issue - a genuine memory-corruption primitive worth patching on 32-bit deployments, but not an active-exploitation emergency. Note the SSVC/automatable picture is not provided in the input; the practical limiter is the 32-bit + untrusted-regex precondition, not network reachability.

Exploit ScenarioDerived

An application running on a 32-bit Perl build accepts a user-supplied search pattern (for example a log-search or templating feature) and compiles it directly. An attacker submits a regular expression containing a fixed literal repeated with a very large minimum quantifier, causing mincount * length to overflow SSize_t, allocating an undersized buffer and overflowing the heap during regex compilation. The crash is reproducible (the patch removes a TODO 'This crashes' marker from the t/re/pat_psycho.t regression test), but no weaponized public exploit was identified at time of analysis.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 27, 2026

Heap-based buffer overflow in Perl interpreters up to and including 5.43.10 on 32-bit builds lets a caller that compiles an attacker-controlled regular expression corrupt heap memory at regex compile time, with potential for code execution. The flaw stems from an integer overflow in Perl_study_chunk when optimizing a repeated fixed substring, and is rated CVSS 9.8 by NVD. EPSS is very low (0.02%, 5th percentile) and there is no public exploit identified at time of analysis; the issue is limited to 32-bit Perl builds and applications that feed untrusted input into regex compilation.

RemediationAI

Upstream fix available (commit 5e7f119eb2bb1181be908701f22bf7068e722f1c); a released patched tagged version was not independently confirmed from the provided data, so apply the vendor/distribution build that incorporates this commit once published, or rebuild Perl from source with the patch applied (it adds an overflow guard in Perl_study_chunk that fails compilation with 'Regexp out of space' instead of overflowing). As a compensating control where patching is not immediately possible, the most effective and low-cost mitigation is to run a 64-bit Perl build instead of 32-bit, which removes the SSize_t overflow condition entirely; the trade-off is increased memory footprint and the need to rebuild/redeploy. If the platform must remain 32-bit, stop passing untrusted input into regex compilation - validate or whitelist regex sources, and cap the maximum quantifier repeat count permitted in user-supplied patterns (trade-off: may reject legitimate large-count patterns). Reference the upstream commit and the oss-security advisory (http://www.openwall.com/lists/oss-security/2026/05/26/1) when coordinating distro updates.

Affected VersionsENISA

perl 0 ≤5.43.10

Affected Packages

euvd perl no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Perl's regex engine includes an optimization pass (Perl_study_chunk in regcomp_study.c) that joins and pre-expands fixed substrings to speed up matching. When a fixed string is quantified with a minimum repeat count, the engine allocates a buffer via SvGROW and copies the substring mincount times. The bug, classified as CWE-680 (Integer Overflow to Buffer Overflow), is that the size check was performed in characters rather than bytes: the byte length computed as mincount * l (length) could overflow the signed SSize_t type, which on 32-bit builds is only 32 bits wide. The overflow yields a small, wrapped value passed to SvGROW, producing an undersized allocation, after which the subsequent copy writes past the end of the heap buffer. The official commit (5e7f119e) adds an explicit overflow guard (mincount >= SSize_t_MAX/l or old > SSize_t_MAX - mincount*l) that raises 'Regexp out of space' instead of overflowing. The affected component is the core Perl interpreter itself (CPE cpe:2.3:a:shay:perl:*), not a specific CPAN module.

Know when Perl gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
NVD PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SUSE 7.3 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Red Hat 5.7 MEDIUM

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVSS changed
May 27, 2026 - 19:37 NVD
9.8 (CRITICAL)
CVE Published
May 25, 2026 - 23:53 nvd
UNKNOWN (no severity yet)

DescriptionNVD

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.

Executive ViewAI

Why It Matters

Perl interpreters version 5.43.10 and earlier on 32-bit builds contain a heap buffer overflow in regex compilation that could enable code execution when processing untrusted regular expressions. While the CVSS score is critical (9.8), real-world risk is substantially constrained by the 32-bit architecture limitation, very low EPSS score (0.02%), and no public exploit identified at time of analysis.

Business Impact: High
Compensating Controls

Apply vendor patch. Interim mitigations: disable 32-bit Perl if operationally feasible, restrict regex compilation to trusted data sources, implement regex pattern complexity limits to reject pathological patterns.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

More in Perl

View all
CVE-2012-6329 HIGH POC
7.5 Jan 04

The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly hand

CVE-2017-12814 CRITICAL POC
9.8 Sep 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

CVE-2015-8608 CRITICAL POC
9.8 Feb 07

The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of

CVE-2018-18314 CRITICAL POC
9.8 Dec 07

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

CVE-2018-18312 CRITICAL POC
9.8 Dec 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

CVE-2026-13221 CRITICAL POC
9.1 Jul 13

Silently incorrect regular-expression matching in the Perl interpreter (all versions through 5.43.9) lets an oversized a

CVE-2018-18313 CRITICAL POC
9.1 Dec 07

Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive informa

CVE-2016-2381 HIGH
7.5 Apr 08

Perl might allow context-dependent attackers to bypass the taint protection mechanism in a child process via duplicate e

CVE-2023-31484 HIGH POC
8.1 Apr 29

CPAN.pm before 2.35 does not verify TLS certificates when downloading distributions over HTTPS. Rated high severity (CVS

CVE-2016-6185 HIGH POC
7.8 Aug 02

The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which mig

CVE-2018-12015 HIGH POC
7.5 Jun 07

In Perl through 5.26.2, the Archive::Tar module allows remote attackers to bypass a directory-traversal protection mecha

CVE-2020-10543 HIGH
8.2 Jun 05

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

Vendor StatusVendor

SUSE

Severity: High
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed
SLES15-SP6-CHOST-BYOS-EC2 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy