
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-19487 is a regex engine logic flaw in Perl that causes incorrect regular expression match results due to a stale failure flag in the Aho-Corasick prescan within S_find_byclass. It affects Perl versions from 5.9.4 (introduced with the trie optimization in Perl 5.10) through 5.41.8, with 5.41.9 and later being unaffected. The vulnerability was publicly disclosed on August 13, 2026, and assigned by CPANSec. It carries a CVSS v3.1 base score of 5.3 (Medium) (Github Advisory, oss-security).
The root cause is classified as CWE-670 (Always-Incorrect Control Flow Implementation). In Perl's S_find_byclass function within regexec.c, the Aho-Corasick prescan uses a failed flag to track failed state transitions. When a transition fails, the flag is set; however, when a subsequent transition succeeds, the flag is never cleared. This causes the prescan to prematurely terminate, missing valid candidate match positions that start earlier in the subject string. The result is that alternation patterns can match the wrong branch or fail to match entirely — for example, "ABCDE" =~ m/ABCF|BCDE|C/ incorrectly matches C at offset 2 instead of BCDE. The fix is a single-line addition (failed = 0;) after a successful transition in regexec.c (Perl patch, Perl issue #22892).
The primary security consequence is that access control or input filtering logic implemented using Perl regex alternations may produce incorrect decisions — either failing to match input that should be blocked, or matching on the wrong branch. An unauthenticated network attacker can craft input that exploits this flaw to bypass security filters, input validators, or access controls that rely on pattern matching. The CVSS assessment reflects a low availability impact (incorrect match results can cause logic failures), with no direct confidentiality or integrity impact at the engine level, though application-level integrity is at risk if security decisions are based on flawed regex results (Github Advisory, oss-security).
No public proof-of-concept exploit or evidence of in-the-wild exploitation has been reported as of the disclosure date. The NVD SSVC assessment notes the vulnerability is automatable (no user interaction required) and has a partial technical impact. The EPSS score is 0.0, indicating very low current probability of exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been identified (Github Advisory, oss-security).
m/ABCF|BCDE|C/).The recommended remediation is to upgrade Perl to version 5.41.9 or later (or Perl 5.42.0 stable when available), which includes the one-line fix resetting the failed flag after a successful Aho-Corasick transition. For environments that cannot upgrade immediately, the upstream patch can be applied directly to regexec.c. As an interim measure, security-critical regex patterns used for access control or input validation should be reviewed and tested against the known edge-case inputs, and additional non-regex validation layers should be considered for critical security decisions (oss-security, Perl patch).
The vulnerability was originally reported by user mauke on the Perl GitHub issue tracker in January 2025, referencing an initial discovery and public discussion by jwz on his blog. The bug was noted to have existed undetected for over a decade since the trie optimization was introduced in Perl 5.10. The fix was authored by Yves Orton and the CVE was formally assigned and disclosed by the CPAN Security Group (CPANSec) in August 2026. Community discussion appeared on oss-security and Bluesky (Perl issue #22892, oss-security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."