CVE-2026-13221
JSON

9.1critical

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

Severity
9.1critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.54% (higher than 46% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

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.

Affected

Product or packageVersionsReported by
perlbefore 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.10CVE List
perl perlup to 5.43.9NVD

All scores

CISA-ADP9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Classification

CWE-190

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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 (es)

Las versiones de Perl hasta la 5.43.9 producen silenciosamente coincidencias incorrectas de expresiones regulares cuando una alternancia de más de 65535 ramas de cadena fija se compila en un trie en Perl_study_chunk. Cuando dichas ramas se combinan en un trie, el delta entre la primera rama y la cola compartida se almacena en un campo de 16 bits. Un recuento de ramas superior a 65535 desborda el campo, y la tabla de decisión de coincidencias del trie se trunca sin advertencia ni error. Un patrón de esta forma produce coincidencias de falsos positivos (coincidiendo con cadenas que no debería) y coincidencias de falsos negativos (fallando en coincidir con cadenas que sí debería). Cuando dicho patrón condiciona una decisión de acceso o filtrado, el resultado es incorrecto.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-13221 changed 2026-11-10CVE Terms of Use
NVDCVE-2026-13221 changed 2026-11-10Public domain