CVE-2026-9390
JSON

9.1critical

XML::Sig versions before 0.71 for Perl allow XPath injection in ID lookup

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

Description

XML::Sig versions before 0.71 for Perl allow XPath injection in ID lookup. verify() and _get_signed_xml() in lib/XML/Sig.pm build XPath expressions by concatenating the SignedInfo/Reference/@URI value read from the document being verified. The value is neither escaped nor checked against the NCName grammar that XML requires of an ID, so a URI containing a single quote closes the string literal in the generated expression and appends arbitrary XPath operators. A crafted URI can make the lookup match elements the reference does not name, or every element in the document, so which node is selected for digest verification is decided by the injected expression rather than by the reference.

Affected

Product or packageVersionsReported by
XML-Sigbefore 0.71CVE List
xml::sig_project xml::sigbefore 0.71NVD

Classification

CWE-643CWE-1287

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

What each source says

CVE List

XML::Sig versions before 0.71 for Perl allow XPath injection in ID lookup. verify() and _get_signed_xml() in lib/XML/Sig.pm build XPath expressions by concatenating the SignedInfo/Reference/@URI value read from the document being verified. The value is neither escaped nor checked against the NCName grammar that XML requires of an ID, so a URI containing a single quote closes the string literal in the generated expression and appends arbitrary XPath operators. A crafted URI can make the lookup match elements the reference does not name, or every element in the document, so which node is selected for digest verification is decided by the injected expression rather than by the reference.

NVD (es)

Las versiones de XML::Sig anteriores a la 0.71 para Perl permiten la inyección de XPath en la búsqueda de ID. verify() y _get_signed_xml() en lib/XML/Sig.pm construyen expresiones XPath concatenando el valor SignedInfo/Reference/@URI leído del documento que se está verificando. El valor no se escapa ni se verifica contra la gramática NCName que XML requiere para un ID, por lo que un URI que contiene una comilla simple cierra el literal de cadena en la expresión generada y añade operadores XPath arbitrarios. Un URI manipulado puede hacer que la búsqueda coincida con elementos que la referencia no nombra, o con cada elemento del documento, por lo que qué nodo se selecciona para la verificación del resumen es decidido por la expresión inyectada en lugar de por la referencia.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-9390 changed 2026-08-03CVE Terms of Use
NVDCVE-2026-9390 changed 2026-10-23Public domain