← All Advisories
Reported from OT-Advisories.com as of

A 16-Bit Overflow in Perl's Regex Trie Compiler Turns Alternations Past 65,535 Branches Into Silently Wrong Matches, Risking Access-Control Bypass

Last refreshed2026-11-16

Status: UPDATED  |  Advisory ID: CVE-2026-13221

Key Details

CVECVE-2026-13221
CVSS Score / Version
9.1 (Critical) / CVSS v3.1
Updated2026-11-10
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVSS Prose
attack vector is network; attack complexity is low; privileges required is none; user interaction is none; scope is unchanged; confidentiality impact is none; integrity impact is high; availability impact is high.
Affected products
see table below
Classified as
CWE-190 (Integer Overflow or Wraparound)
Exploitation prediction (EPSS)
0.53% probability of exploitation in the next 30 days (45% percentile) -- FIRST.org's EPSS model.

Affected Products, Subsystems & Sectors

VendorProductAffected VersionsPatch Status
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0)
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0)
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0)
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0)
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0)
perlperl
SubsystemsControllers & Field I/O
SectorsMultiple

What to Know

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. (NVD)

What to Do

Currently no fix is available
Source: Siemens SSA-457936

References

SourceReference
NVDhttps://nvd.nist.gov/vuln/detail/CVE-2026-13221
CVEhttps://www.cve.org/CVERecord?id=CVE-2026-13221
Vendor advisoryhttps://cert-portal.siemens.com/productcert/html/ssa-457936.html
Report compilation © 2026 OT-Advisories.com  ·  CC BY 4.0  ·  Source materials remain the property of their respective publishers as cited.