Description
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.
Published: 2026-08-09
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw resides in Perl’s regular-expression engine, where the superlinear cache used during matching is undersized and its byte count is not checked for signed-32‑bit overflow. A crafted subject string can cause the cache to reference memory beyond its allocation, producing out-of-bounds reads and writes. The result is heap corruption that may crash the Perl process or, if the attacker can control the corruption pattern, lead to arbitrary code execution. The vulnerability is identified as CWE‑125, CWE‑190, and CWE‑787.

Affected Systems

The issue affects all Perl versions up to and including 5.45.1 delivered by the LEONT vendor. Any installation running those releases that processes user-supplied input through the regex engine is potentially susceptible.

Risk and Exploitability

No EPSS score is available and the flaw is not listed in the CISA KEV catalog, but the nature of the bug—unbounded memory accesses—suggests a high severity if exploited. An attacker who can provide a carefully designed subject string to a Perl process (e.g., through a web application or script) can trigger the overflow and cause memory corruption. The attack requires local or remote code execution capability only if the malicious input can control the regex evaluation, which is plausible in many real-world scenarios such as web services or command-line utilities that accept untrusted strings.

Generated by OpenCVE AI on August 9, 2026 at 19:21 UTC.

Remediation

Vendor Solution

Upgrade to a future Perl release, or apply the upstream patches.


OpenCVE Recommended Actions

  • Upgrade to a Perl release newer than 5.45.1
  • Apply the upstream patches linked in the advisory
  • Avoid executing untrusted input through Perl’s regex engine or enforce strict input validation on such data

Generated by OpenCVE AI on August 9, 2026 at 19:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 09 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Description 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.
Title 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
Weaknesses CWE-125
CWE-190
CWE-787
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-09T17:49:50.033Z

Reserved: 2026-07-12T17:04:25.249Z

Link: CVE-2026-15534

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-09T19:30:04Z

Weaknesses