Skip to main content

XML::Sig EUVDEUVD-2026-52269

| CVE-2026-9390 CRITICAL
Improper Neutralization of Data within XPath Expressions ('XPath Injection') (CWE-643)
2026-08-03 CPANSec GHSA-mhmm-7px6-jx3j
9.1
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach an endpoint that verifies signed XML
  2. Delivery
    Craft Reference @URI with quote and XPath payload
  3. Exploit
    Injected expression breaks out of ID lookup
  4. Execution
    Verifier digests attacker-chosen node
  5. Persist
    Malformed signature accepted as valid
  6. Impact
    Forge authenticated assertion / bypass auth

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization XPath expression sanitization
Exploitation Conditions

Exploitation requires that the target application call XML::Sig verify()/_get_signed_xml() on an XML document whose SignedInfo/Reference/@URI value is attacker-influenced - i.e. any flow that verifies externally supplied signed XML (the canonical case being SAML message/assertion verification via perl-net-saml2). The concrete trigger is a Reference @URI that violates the XML NCName grammar by embedding a single quote plus XPath operators, which pre-0.71 code passes unescaped into the ID-lookup XPath. Per CVSS AV:N/AC:L/PR:N/UI:N there is no authentication or user interaction required beyond the ability to deliver the crafted document to the verifier. Limiting factors: the affected code path must actually be reached (the application must perform verification, not merely signing), the deployed XML::Sig must be older than 0.71, and the attacker must be able to submit XML to that verification endpoint - deployments that only sign, or that already validate URIs upstream, are not exposed.

Impact

The NVD CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H, 9.1 Critical) reflects a network-reachable, unauthenticated, low-complexity flaw with high integrity impact - appropriate for a library that adjudicates signature trust, since an attacker who can bypass signature checks can forge authenticated SAML assertions or signed messages. That said, the stated C:H is generous: the described impact is fundamentally an integrity/authentication bypass (which node is trusted), not a confidentiality leak, so the practical damage is authentication bypass rather than data disclosure. Signals are otherwise limited: there is no EPSS score, KEV entry, or SSVC record in the provided data, and no POC is referenced - so this is a high-severity-by-design issue whose real-world exploitation is currently unproven. Priority should still be high for anyone running perl-net-saml2 or otherwise verifying externally supplied XML with XML::Sig, because exploitation requires only crafting a malicious signed document, which is squarely within an attacker's control. Absence of EPSS/KEV data should be read as 'not yet observed / not measured,' not as low risk.

Exploit ScenarioDerived

An attacker who can present a signed XML document to a service using XML::Sig - for example a forged SAML response sent to a Perl service provider - crafts a SignedInfo/Reference/@URI containing a single quote and injected XPath (such as a predicate that matches every element or an unrelated node). When verify() resolves the reference, the injected expression, not the reference, selects which node is digested, so the digest check passes against a node the attacker controls while the actual assertion body is unsigned or substituted, yielding signature/authentication bypass. No POC is publicly referenced, but the network vector and low complexity make a hand-crafted document sufficient.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 03, 2026

Signature-verification bypass in the Perl XML::Sig module before 0.71 allows remote attackers to forge which document node is validated by injecting XPath operators through the SignedInfo/Reference/@URI attribute. Because verify() and _get_signed_xml() concatenate the attacker-controlled URI into an XPath expression without escaping or NCName validation, a single quote breaks out of the string literal and lets the injected expression decide which element is digest-checked - undermining the integrity guarantee of any XML Signature the library verifies. No public exploit has been identified at time of analysis, and the flaw is not on CISA KEV; a vendor patch exists in release 0.71.

RemediationAI

Vendor-released patch: upgrade XML::Sig to version 0.71 or later from CPAN (metacpan.org/release/TIMLEGGE/XML-Sig-0.71), which enforces the NCName grammar on Reference URIs and XML IDs and rejects malformed values with a croak. The upstream fix is delivered in commits 69ad2b421118fadd33d57f50b110b8d161e8fef5 and a85aad21aa767ac1c158bbfc19447683941ab376 (patch links in references). If immediate upgrade is not possible, compensating controls are limited but real: reject or pre-validate any incoming SignedInfo/Reference/@URI so it matches the NCName pattern (leading '#', then an XML NCName with no quotes, brackets, or XPath metacharacters) before passing documents to verify() - trade-off is you must maintain parsing logic that duplicates the fix; and restrict which parties can submit signed XML to the verifier (e.g. accept SAML only from allow-listed IdP endpoints over mutually authenticated TLS) to shrink the attacker population, though this does not stop a malicious or compromised trusted peer. Note that pinning to 0.71 also changes signing behavior, since IDs like '123' are now rejected in favor of NCName-valid IDs such as '_123' - review any code that generates numeric-leading IDs.

Affected VersionsENISA

XML::Sig 0 <0.71

Affected Packages

euvd xml_sig fix: 0.71

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

XML::Sig implements W3C XML Digital Signature (XML-DSig) verification for Perl and is a core dependency of perl-net-saml2, so it typically sits in SAML SSO trust decisions. In XML-DSig, each SignedInfo/Reference names the protected element by an ID via its @URI (e.g. URI="#_abc"), and the verifier must resolve that ID and digest exactly that node. The root cause is CWE-643 (XPath/expression-language injection): the code reads the @URI value and builds an XPath ID lookup by string concatenation. Per the XML spec an ID must be an NCName (letters, digits, and a small punctuation set, no quotes), but the library never enforced that grammar, so a URI containing a single quote terminates the literal and appends arbitrary XPath (e.g. //* or predicate operators). The 0.71 fix introduces strict $NCNameStartChar/$NCNameChar regexes and croaks whenever a Reference URI or XML ID fails to match the NCName pattern, closing the injection at both the verify() and _get_signed_xml() paths and also validating IDs during signing.

Know when Xml gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.5 HIGH

Remote, unauthenticated, low-complexity crafting of a signed document (AV:N/AC:L/PR:N/UI:N); impact is signature/authentication bypass so I:H, with no genuine confidentiality or availability loss (C:N/A:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

3
CVSS changed
Aug 03, 2026 - 20:22 NVD
9.1 (CRITICAL)
CVE Published
Aug 03, 2026 - 13:09 cve.org
UNKNOWN (no severity yet)
CVE Published
Aug 03, 2026 - 13:09 cve.org
CRITICAL 9.1

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Perl XML::Sig library versions before 0.71 contain a flaw allowing attackers to bypass XML digital signature verification and forge signatures on critical documents. Organizations using this library for SAML authentication, document verification, or secure API operations face elevated risk to the integrity and authenticity of these critical functions if running unpatched versions.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
niche Perl XML-signature module, mainly used by perl-net-saml2 SAML stacks
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy