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.

Project Subscriptions

Vendors Products
Timlegge Subscribe
Xml::sig Subscribe
Advisories

No advisories yet.

Fixes

Solution

Upgrade to version 0.71


Workaround

No workaround given by the vendor.

History

Mon, 03 Aug 2026 16:15:00 +0000

Type Values Removed Values Added
First Time appeared Timlegge
Timlegge xml::sig
Vendors & Products Timlegge
Timlegge xml::sig

Mon, 03 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
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.
Title XML::Sig versions before 0.71 for Perl allow XPath injection in ID lookup
Weaknesses CWE-1287
CWE-643
References

Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-03T13:09:40.158Z

Reserved: 2026-05-23T20:04:32.906Z

Link: CVE-2026-9390

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T15:51:32Z

Weaknesses