{"api_version":"1","generated_at":"2026-08-13T17:40:30+00:00","cve":"CVE-2026-19487","urls":{"html":"https://cve.report/CVE-2026-19487","api":"https://cve.report/api/cve/CVE-2026-19487.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-19487","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-19487"},"summary":{"title":"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","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.\n\nThe 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.\n\nExample:\n\n  \"ABCDE\" =~ m/ABCF|BCDE|C/;    # matches C at offset 2, not BCDE\n  \"ABCDE\" =~ m/ABCF|BCDE|C(G)/; # no match, BCDE missed\n\nAn 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.","state":"PUBLISHED","assigner":"CPANSec","published_at":"2026-08-13 16:17:59","updated_at":"2026-08-13 16:17:59"},"problem_types":["CWE-670","CWE-670 CWE-670 Always-Incorrect Control Flow Implementation"],"metrics":[],"references":[{"url":"https://github.com/Perl/perl5/issues/22892","name":"https://github.com/Perl/perl5/issues/22892","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/Perl/perl5/commit/1a21abacaf6f684928bae8baaa153733c8c238eb.patch","name":"https://github.com/Perl/perl5/commit/1a21abacaf6f684928bae8baaa153733c8c238eb.patch","refsource":"9b29abf9-4ab0-4765-b253-1875cd9b441e","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-19487","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-19487","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[{"source":"CNA","title":"","value":"Upgrade to Perl 5.42.0 or later, or apply the upstream patch.","time":"","lang":"en"}],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"collectionURL":"https://cpan.org/modules","defaultStatus":"unaffected","modules":["perl"],"packageName":"perl","packageURL":"pkg:cpan/perl","programFiles":["regexec.c"],"programRoutines":[{"name":"S_find_byclass"}],"repo":"https://github.com/Perl/perl5","versions":[{"lessThan":"5.41.9","status":"affected","version":"5.9.4","versionType":"custom"}]}],"descriptions":[{"lang":"en","value":"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.\n\nThe 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.\n\nExample:\n\n  \"ABCDE\" =~ m/ABCF|BCDE|C/;    # matches C at offset 2, not BCDE\n  \"ABCDE\" =~ m/ABCF|BCDE|C(G)/; # no match, BCDE missed\n\nAn 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."}],"problemTypes":[{"descriptions":[{"cweId":"CWE-670","description":"CWE-670 Always-Incorrect Control Flow Implementation","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-08-13T15:51:04.090Z","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","shortName":"CPANSec"},"references":[{"tags":["patch"],"url":"https://github.com/Perl/perl5/commit/1a21abacaf6f684928bae8baaa153733c8c238eb.patch"},{"tags":["issue-tracking"],"url":"https://github.com/Perl/perl5/issues/22892"}],"solutions":[{"lang":"en","value":"Upgrade to Perl 5.42.0 or later, or apply the upstream patch."}],"source":{"discovery":"UNKNOWN"},"title":"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","x_generator":{"engine":"cpansec-cna-tool 0.1"}}},"cveMetadata":{"assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","assignerShortName":"CPANSec","cveId":"CVE-2026-19487","datePublished":"2026-08-13T15:51:04.090Z","dateReserved":"2026-08-10T16:35:50.763Z","dateUpdated":"2026-08-13T15:51:04.090Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-08-13 16:17:59","lastModifiedDate":"2026-08-13 16:17:59","problem_types":["CWE-670","CWE-670 CWE-670 Always-Incorrect Control Flow Implementation"],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"19487","Ordinal":"1","Title":"Perl versions from 5.9.4 before 5.41.9 produce incorrect regular","CVE":"CVE-2026-19487","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"19487","Ordinal":"1","NoteData":"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.\n\nThe 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.\n\nExample:\n\n  \"ABCDE\" =~ m/ABCF|BCDE|C/;    # matches C at offset 2, not BCDE\n  \"ABCDE\" =~ m/ABCF|BCDE|C(G)/; # no match, BCDE missed\n\nAn 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.","Type":"Description","Title":"Perl versions from 5.9.4 before 5.41.9 produce incorrect regular"}]}}}