CVE-2026-19487: CWE-670 Always-Incorrect Control Flow Implementation
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.
AI Analysis
Technical Summary
This vulnerability arises from an always-incorrect control flow implementation (CWE-670) in Perl's regular expression engine. Specifically, the Aho-Corasick prescan in S_find_byclass uses a failure flag to track failing transitions, but once set, the flag is not cleared by later successful transitions. As a result, the prescan may stop prematurely, missing earlier candidate matches. For example, the pattern alternation 'ABCF|BCDE|C' on the string 'ABCDE' incorrectly matches 'C' at offset 2 instead of 'BCDE'. This flaw affects Perl versions starting at 5.9.4 through versions before 5.41.9.
Potential Impact
The vulnerability causes Perl's regex engine to produce incorrect match results, which can lead to wrong access control or filtering decisions in applications relying on these matches. This may result in unintended behavior or security policy bypasses where regex matching is critical.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is provided in the available data. Users should monitor vendor communications for patches addressing this issue.
CVE-2026-19487: CWE-670 Always-Incorrect Control Flow Implementation
Description
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.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from an always-incorrect control flow implementation (CWE-670) in Perl's regular expression engine. Specifically, the Aho-Corasick prescan in S_find_byclass uses a failure flag to track failing transitions, but once set, the flag is not cleared by later successful transitions. As a result, the prescan may stop prematurely, missing earlier candidate matches. For example, the pattern alternation 'ABCF|BCDE|C' on the string 'ABCDE' incorrectly matches 'C' at offset 2 instead of 'BCDE'. This flaw affects Perl versions starting at 5.9.4 through versions before 5.41.9.
Potential Impact
The vulnerability causes Perl's regex engine to produce incorrect match results, which can lead to wrong access control or filtering decisions in applications relying on these matches. This may result in unintended behavior or security policy bypasses where regex matching is critical.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is provided in the available data. Users should monitor vendor communications for patches addressing this issue.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-08-10T16:35:50.763Z
- State
- PUBLISHED
Threat ID: 6a7de96abf8831d5396b0490
Added to database: 08/13/2026, 15:57:30 UTC
Last enriched: 08/13/2026, 16:14:59 UTC
Last updated: 09/26/2026, 13:47:43 UTC
Views: 70
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.