CVE-2026-13221: 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

Published Jul 13, 2026
·
Updated

Last updated 9 September 2026

Other sources

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 Perlstudychunk.

— Launchpad

Perl versions through 5.43.9 produce silently incorrect regular expression matches when an alternation of more than 65535 fixed string branches is compiled into a trie in Perlstudychunk

— Microsoft

Uncontrolled recursion in the ordered-JSON support of github.com/go-openapi/swag/jsonutils. Both the marshal and unmarshal paths of the stdlib and easyjson adapters recurse once per nesting level with no depth limit, so a deeply nested JSON document, or an equally deep in-memory JSONMapSlice passed to WriteJSON, drives the Go runtime to a non-recoverable "fatal error: stack overflow" and kills the process. The ordered-JSON path uses its own lexer instead of encoding/json and so does not benefit from the standard library decoder max-nesting-depth guard. Fixed in v0.27.1, which bounds nesting at 10000 levels. The same unbounded recursion is present in the pre-split root module github.com/go-openapi/swag, where the code lived in yaml.go until v0.24.0.

— IBM

Affected Software

5 affected componentsFixes available
Perl Perl<=5.43.9
Microsoft azl3 perl 5.38.2-512<5.38.2-513
5.38.2-513
debian/perl<=5.36.0-7+deb12u3, <=5.36.0-7+deb12u2, <=5.40.1-6
5.42.3-1
Perl Perl<=5.43.9
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.38.2-513
  2. Upgrade

    Upgrade debian/perl to a version that resolves this vulnerability.

    Fixed in 5.42.3-1
  3. Upgrade

    Upgrade Perl to a version that resolves this vulnerability.

    Fixed in 5.40.5
  4. Upgrade

    Upgrade Perl to a version that resolves this vulnerability.

    Fixed in 5.42.3
  5. Upgrade

    Upgrade Perl to a version that resolves this vulnerability.

    Fixed in 5.44.0
  6. Upgrade

    Upgrade github.com/go-openapi/swag to a version that resolves this vulnerability.

    Fixed in v0.27.1

Event History

Jul 13, 2026
CVE Published
via MITRE·03:40 PM
Data Sourced
via MITRE·03:40 PM
RemedyDescriptionWeakness
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·05:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 15, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:01 AM
Affected Software
Oct 21, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-13221?

The severity of CVE-2026-13221 is rated at 27.

2

How do I fix CVE-2026-13221?

To fix CVE-2026-13221, upgrade to Perl version 5.44 or later.

3

What versions of Perl are affected by CVE-2026-13221?

Perl versions through 5.43.9 are affected by CVE-2026-13221.

4

What type of vulnerability is CVE-2026-13221?

CVE-2026-13221 is classified as an Integer Overflow vulnerability.

5

What impact does CVE-2026-13221 have on regular expressions?

CVE-2026-13221 can cause silently incorrect regular expression matches when handling a large number of fixed string branches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203