Quick answers
- Is CVE-2026-13221 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-13221 being exploited in the wild.
- How severe is CVE-2026-13221?
- Informational severity, with a CVSS score of 0, published 13 July 2026.
- Which products and versions are affected?
- Perl Foundation Perl Through 5.43.9.
- Is there a fix for CVE-2026-13221?
- A patch was published on 2026-03-26: Patch authored by Karl Williamson Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-13221 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2026-13221?
- Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
An integer overflow vulnerability exists in Perl's regular expression compiler, specifically within the `Perl_study_chunk` function in `regcomp_study.c`. When a regular expression contains an alternation of more than 65,535 fixed-string branches, the engine attempts to compile them into a trie optimization structure. The delta between the first branch and the shared tail is stored in a 16-bit field; exceeding this limit causes a silent overflow and truncation of the match decision table. This results in false positives and false negatives during pattern matching. If such patterns are used for security-critical tasks like input validation or access control, the logic can be bypassed. A patch has been developed to prevent trie optimization when an overflow would occur.
Affected products
- Perl Foundation Perl Through 5.43.9
Timeline
- 2026-03-26: patched: Patch authored by Karl Williamson
- 2026-07-13: advisory: CVE-2026-13221 published