CVE-2026-18568 Details
Description
XML::Sig versions from 0.29 before 0.72 for Perl allow signature verification bypass because verify returns true when every signature was skipped before any cryptographic check. verify in lib/XML/Sig.pm counts the `//dsig:Signature` elements into `$numsigs` and iterates over them, but two paths reach `next` before any digest or key check runs: a `SignedInfo/Reference/@URI` that resolves to no element while `$numsigs` is greater than 1, and, when `id_attr` is set, a reference that does not match the requested ID. The loop records nothing about what it checked, so when every signature takes one of those paths control reaches the unconditional `return 1` that ends verify. Two `Signature` elements whose Reference URI names an ID that no element carries is enough, as is one such element combined with `id_attr`. Any caller that passes untrusted XML to verify can receive a true return for a document in which no digest and no signature value was checked; a `cert` or `cert_text` trust anchor does not change this, because no key check runs. Versions up to 0.28 use an XML::XPath based verify that has no such skip and are not affected.
A vulnerability in XML::Sig versions 0.29 prior to 0.72 for Perl allows bypassing signature verification. The issue arises because the verify function returns true when signatures are skipped, avoiding any cryptographic checks. This flaw occurs in lib/XML/Sig.pm, where the verify function counts signature elements and iterates over them. However, two conditions can cause it to skip signatures before any key or digest verification: when a 'SignedInfo/Reference/@URI' does not resolve to an element while more than one signature is present, and when 'id_attr' is set to a reference that does not match the required ID. As a result, a document with only forged signature elements can be incorrectly validated as genuine.
Users are advised to upgrade to XML::Sig version 0.72 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/perl-net-saml2/perl-XML-Sig/commit/ef22cfed1ac0f29b316d17eb79cf6480e03ae16a.patch | CPANSec | Patch |
| https://metacpan.org/release/TIMLEGGE/XML-Sig-0.72/changes | CPANSec | Release Notes |
| https://www.cve.org/CVERecord?id=CVE-2025-40934 | CPANSec | Not Applicable |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-347 | Improper Verification of Cryptographic Signature | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| xml::sig project xml::sig | >= 0.29, < 0.72 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 23, 2026 | CVE Translated | [email protected] |
| Aug 5, 2026 | Initial Analysis | [email protected] |
| Aug 3, 2026 | CVE Modified | CISA-ADP |
| Aug 3, 2026 | New CVE Received | CPANSec |