# CVE-2026-13221: Integer overflow in perl:perl

> Perl regex engine integer overflow causes incorrect matches, potentially bypassing security filters or access controls.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jul 2026
- **Updated:** 8 Sep 2026
- **Also known as:** ALPINE-CVE-2026-13221, ALSA-2026:67155, ALSA-2026:67156, ALSA-2026:67162, ALSA-2026:67278, AZL-92300, DEBIAN-CVE-2026-13221, ECHO-6100-7255-ee29, GHSA-whhx-pv66-xhgq, MINI-2766-r85p-j4cp, MINI-ghgh-35v3-3mm5, MINI-h79w-p96m-84m7, MINI-ppxc-4vph-wfqh, OESA-2026-3144, OESA-2026-3145, OESA-2026-3146, RHSA-2026:67155, RHSA-2026:67156, RHSA-2026:67162, RHSA-2026:67278, RLSA-2026:67155, RLSA-2026:67156, RLSA-2026:67162, RLSA-2026:67278, ROOT-OS-ALPINE-322-CVE-2026-13221, ROOT-OS-ALPINE-323-CVE-2026-13221, ROOT-OS-DEBIAN-11-CVE-2026-13221, UBUNTU-CVE-2026-13221

## What is CVE-2026-13221?

CVE-2026-13221 is a critical vulnerability in perl:perl, published on 13 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.10 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.

Weakness: CWE-190 (Integer Overflow or Wraparound)

## Which versions are affected by CVE-2026-13221?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `perl` | AlmaLinux:10 | All versions | 4:5.40.2-515.el10_2 |
| `perl-Attribute-Handlers` | AlmaLinux:10 | All versions | 1.03-515.el10_2 |
| `perl-AutoLoader` | AlmaLinux:10 | All versions | 5.74-515.el10_2 |
| `perl-AutoSplit` | AlmaLinux:10 | All versions | 5.74-515.el10_2 |
| `perl-B` | AlmaLinux:10 | All versions | 1.89-515.el10_2 |
| `perl-Benchmark` | AlmaLinux:10 | All versions | 1.25-515.el10_2 |
| `perl-Class-Struct` | AlmaLinux:10 | All versions | 0.68-515.el10_2 |
| `perl-Config-Extensions` | AlmaLinux:10 | All versions | 0.03-515.el10_2 |
| `perl-DBM_Filter` | AlmaLinux:10 | All versions | 0.06-515.el10_2 |
| `perl-Devel-Peek` | AlmaLinux:10 | All versions | 1.34-515.el10_2 |
| `perl-Devel-SelfStubber` | AlmaLinux:10 | All versions | 1.06-515.el10_2 |
| `perl-DirHandle` | AlmaLinux:10 | All versions | 1.05-515.el10_2 |
| `perl-Dumpvalue` | AlmaLinux:10 | All versions | 2.27-515.el10_2 |
| `perl-DynaLoader` | AlmaLinux:10 | All versions | 1.56-515.el10_2 |
| `perl-English` | AlmaLinux:10 | All versions | 1.11-515.el10_2 |
| `perl-Errno` | AlmaLinux:10 | All versions | 1.38-515.el10_2 |
| `perl-ExtUtils-Constant` | AlmaLinux:10 | All versions | 0.25-515.el10_2 |
| `perl-ExtUtils-Embed` | AlmaLinux:10 | All versions | 1.35-515.el10_2 |
| `perl-ExtUtils-Miniperl` | AlmaLinux:10 | All versions | 1.14-515.el10_2 |
| `perl-Fcntl` | AlmaLinux:10 | All versions | 1.18-515.el10_2 |
| `perl-File-Basename` | AlmaLinux:10 | All versions | 2.86-515.el10_2 |
| `perl-File-Compare` | AlmaLinux:10 | All versions | 1.100.800-515.el10_2 |
| `perl-File-Copy` | AlmaLinux:10 | All versions | 2.41-515.el10_2 |
| `perl-File-DosGlob` | AlmaLinux:10 | All versions | 1.12-515.el10_2 |
| `perl-File-Find` | AlmaLinux:10 | All versions | 1.44-515.el10_2 |
| `perl-File-stat` | AlmaLinux:10 | All versions | 1.14-515.el10_2 |
| `perl-FileCache` | AlmaLinux:10 | All versions | 1.10-515.el10_2 |
| `perl-FileHandle` | AlmaLinux:10 | All versions | 2.05-515.el10_2 |
| `perl-FindBin` | AlmaLinux:10 | All versions | 1.54-515.el10_2 |
| `perl-GDBM_File` | AlmaLinux:10 | All versions | 1:1.24-515.el10_2 |
| `perl-Getopt-Std` | AlmaLinux:10 | All versions | 1.14-515.el10_2 |
| `perl-Hash-Util` | AlmaLinux:10 | All versions | 0.32-515.el10_2 |
| `perl-Hash-Util-FieldHash` | AlmaLinux:10 | All versions | 1.27-515.el10_2 |
| `perl-I18N-Collate` | AlmaLinux:10 | All versions | 1.02-515.el10_2 |
| `perl-I18N-LangTags` | AlmaLinux:10 | All versions | 0.45-515.el10_2 |
| `perl-I18N-Langinfo` | AlmaLinux:10 | All versions | 0.24-515.el10_2 |
| `perl-IO` | AlmaLinux:10 | All versions | 1.55-515.el10_2 |
| `perl-IPC-Open3` | AlmaLinux:10 | All versions | 1.22-515.el10_2 |
| `perl-Locale-Maketext-Simple` | AlmaLinux:10 | All versions | 1:0.21-515.el10_2 |
| `perl-Math-Complex` | AlmaLinux:10 | All versions | 1.62-515.el10_2 |

Products: Perl Perl.

## How do I fix CVE-2026-13221?

Upgrade to a fixed version.

## Is CVE-2026-13221 being exploited?

There is no known exploitation of CVE-2026-13221 in the wild and no public exploit code.

## Other vulnerabilities in perl:perl

- [CVE-2026-4176](https://insights.sbomify.com/CVE-2026-4176/): Supply chain in perl (critical 9.8)
- [CVE-2022-48522](https://insights.sbomify.com/CVE-2022-48522/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-12814](https://insights.sbomify.com/CVE-2017-12814/): Memory corruption in n/a (critical 9.8)
- [CVE-2015-8608](https://insights.sbomify.com/CVE-2015-8608/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-12883](https://insights.sbomify.com/CVE-2017-12883/): Memory corruption in n/a (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-13221 and fix it if it is affected.

What it is: CVE-2026-13221 is a critical vulnerability in perl:perl, published on 13 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-13221 in the wild and no public exploit code.

Affected product: perl:perl. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-13221/ (Markdown: https://insights.sbomify.com/CVE-2026-13221/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-13221
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-13221
- OSV: https://osv.dev/vulnerability/CVE-2026-13221

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-13221/
Summaries are generated and may contain mistakes; the official description above is the record.
