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.
Published: 2026-08-03
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

XML::Sig modules prior to version 0.71 construct XPath expressions by concatenating the SignedInfo/Reference/@URI value from an XML document. The URI is neither escaped nor validated against the NCName grammar required for XML IDs. An attacker can inject a single quote into the URI to terminate the string literal in the generated XPath and append arbitrary XPath operators. This XPath injection allows manipulation of the element that is selected for digest calculation, meaning the signature verification process can be directed to any element in the document rather than the intended one, effectively bypassing signature validation.

Affected Systems

The vulnerability affects the TIMLEGGE XML::Sig Perl module in all releases preceding 0.71. Upgrading to version 0.71 or later removes the flaw by sanitizing URI input before building the XPath expression.

Risk and Exploitability

The CVSS score of 9.1 and the EPSS value is unavailable, but the absence of a KEV listing does not diminish the potential impact. If an application accepts external XML documents that it verifies with XML::Sig, a crafted document containing an injected URI can allow the attacker to target arbitrary nodes for examination. This can lead to acceptance of forged signatures and subsequent data integrity or authenticity compromise. The likely attack vector is remote, via any channel that delivers XML to the vulnerable application, or local, if the application processes user-supplied XML. Given the potential for bypass, the overall risk can be considered moderate to high for systems that rely on XML::Sig for secure signature validation.

Generated by OpenCVE AI on August 4, 2026 at 10:24 UTC.

Remediation

Vendor Solution

Upgrade to version 0.71


OpenCVE Recommended Actions

  • Upgrade the XML::Sig Perl module to version 0.71 or later, which implements proper escaping and validation of URI values before constructing XPath expressions.
  • If an immediate upgrade is not possible, apply the patches referenced in the advisory commits that modify verify() and _get_signed_xml() to correctly handle URI values and reject or escape potentially malicious characters.
  • Review all applications that use XML::Sig to ensure they are not processing untrusted XML documents; restrict input to trusted sources or perform additional validation of the SignedInfo/Reference/@URI before verification.

Generated by OpenCVE AI on August 4, 2026 at 10:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 03 Aug 2026 21:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


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

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-03T19:58:50.173Z

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

Link: CVE-2026-9390

cve-icon Vulnrichment

Updated: 2026-08-03T19:58:45.817Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-03T14:16:30.983

Modified: 2026-08-05T14:57:18.977

Link: CVE-2026-9390

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T10:30:07Z

Weaknesses
  • CWE-1287

    Improper Validation of Specified Type of Input

  • CWE-643

    Improper Neutralization of Data within XPath Expressions ('XPath Injection')