{"id":"CVE-2026-18568","state":"PUBLISHED","title":"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","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.\n\nverify 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`.\n\nAny 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.","publishedAt":"2026-08-03T14:38:52.540Z","updatedAt":"2026-08-03T20:05:52.443Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","source":"CISA-ADP"},"assigner":"CPANSec","products":["TIMLEGGE XML::Sig"],"affected":[{"vendor":"TIMLEGGE","product":"XML::Sig","packageName":"XML-Sig","defaultStatus":"unaffected","versions":[{"version":"0.29","status":"affected","lessThan":"0.72","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["lib/XML/Sig.pm"],"programRoutines":[{"name":"XML::Sig::verify"}],"repo":"https://github.com/perl-net-saml2/perl-XML-Sig"}],"references":["https://github.com/perl-net-saml2/perl-XML-Sig/commit/ef22cfed1ac0f29b316d17eb79cf6480e03ae16a.patch","https://metacpan.org/release/TIMLEGGE/XML-Sig-0.72/changes","https://www.cve.org/CVERecord?id=CVE-2025-40934"],"weaknesses":["CWE-347"],"ingestedAt":"2026-10-29T20:11:10.572Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/18xxx/CVE-2026-18568.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-18568","state":"PUBLISHED","datePublished":"2026-08-03T14:38:52.540Z","dateUpdated":"2026-08-03T20:05:52.443Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-08-02T00:59:21.745Z"},"containers":{"cna":{"title":"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","descriptions":[{"lang":"en","value":"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.\n\nverify 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`.\n\nAny 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."}],"affected":[{"vendor":"TIMLEGGE","product":"XML::Sig","packageName":"XML-Sig","defaultStatus":"unaffected","versions":[{"version":"0.29","status":"affected","lessThan":"0.72","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["lib/XML/Sig.pm"],"programRoutines":[{"name":"XML::Sig::verify"}],"repo":"https://github.com/perl-net-saml2/perl-XML-Sig"}],"references":[{"url":"https://github.com/perl-net-saml2/perl-XML-Sig/commit/ef22cfed1ac0f29b316d17eb79cf6480e03ae16a.patch","tags":["patch"]},{"url":"https://metacpan.org/release/TIMLEGGE/XML-Sig-0.72/changes","tags":["release-notes"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40934","tags":["related"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-347","description":"CWE-347 Improper Verification of Cryptographic Signature","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-08-03T14:38:52.540Z"},"solutions":[{"lang":"en","value":"Upgrade to XML::Sig 0.72 or later, which returns false when no reference digest was checked and matched."}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2026-08-03T00:00:00.000Z","value":"Version 0.72 released with fix."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"NONE","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-08-03T20:05:13.814301Z","id":"CVE-2026-18568","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-03T20:05:52.443Z"}}]}}}