Description
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.
Published: 2026-07-13
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw is an integer overflow in Perl’s regular‑expression engine. When an alternation contains more than 65,535 fixed‑string branches, the engine builds a trie that stores the delta between the first branch and the shared tail in a 16‑bit field. The field overflows and silently truncates the match decision table. The result is both false positives and false negatives, which can cause applications to grant unintended access or reject legitimate input when a regex is used for authentication, authorization, or filtering. This weakness matches CWE‑190, Integer Overflow or Wraparound.

Affected Systems

All Perl releases up to and including 5.43.9 are vulnerable. The problem is resolved in the Perl 5.43.10 development release and all later versions.

Risk and Exploitability

The CVSS score of 9.1 categorizes this as a critical vulnerability. The EPSS score of <1% indicates a low probability of exploitation at present, and the flaw is not listed in the CISA KEV catalog. Exploitation would require an attacker to supply a malicious pattern with an alternation that exceeds 65,535 branches, which is unlikely in most production environments but possible in specially crafted code paths.

Generated by OpenCVE AI on August 1, 2026 at 10:11 UTC.

Remediation

Vendor Solution

Apply the upstream patch. The fix is included in the Perl 5.43.10 development release.


OpenCVE Recommended Actions

  • Apply the upstream patch included in Perl 5.43.10 or later.
  • Upgrade to Perl 5.43.10 or a newer release.
  • Examine and refactor any regular expressions that use more than 65,535 alternation branches to avoid triggering the bug.
  • Verify that access or filtering decisions no longer rely on potentially vulnerable regex patterns.

Generated by OpenCVE AI on August 1, 2026 at 10:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 13 Jul 2026 18:15:00 +0000

Type Values Removed Values Added
First Time appeared Shay
Shay perl
Vendors & Products Shay
Shay perl

Mon, 13 Jul 2026 16:30:00 +0000

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

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-14T13:33:18.189Z

Reserved: 2026-06-24T15:38:41.010Z

Link: CVE-2026-13221

cve-icon Vulnrichment

Updated: 2026-07-13T19:30:45.640Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T10:15:03Z

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound