CVE-2026-18568
Full vulnerability record from the local CVENow database.
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.
View original CVE JSON
{
"id": "CVE-2026-18568",
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"published": "2026-08-03T16:16:28.560",
"lastModified": "2026-10-23T21:10:00.157",
"vulnStatus": "Analyzed",
"cveTags": [],
"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."
},
{
"lang": "es",
"value": "Las versiones de XML::Sig desde la 0.29 anteriores a la 0.72 para Perl permiten eludir la verificación de firma porque verify devuelve verdadero cuando se omitió cada firma antes de cualquier comprobación criptográfica.\n\nverify en lib/XML/Sig.pm cuenta los elementos ’//dsig:Signature’ en ’$numsigs’ e itera sobre ellos, pero dos rutas alcanzan ’next’ antes de que se ejecute cualquier comprobación de digest o clave: un ’SignedInfo/Reference/@URI’ que no se resuelve a ningún elemento mientras ’$numsigs’ es mayor que 1, y, cuando ’id_attr’ está configurado, una referencia que no coincide con el ID solicitado. El bucle no registra nada sobre lo que comprobó, así que cuando cada firma toma una de esas rutas, el control alcanza el ’return 1’ incondicional que finaliza verify. Dos elementos ’Signature’ cuyo URI de Referencia nombra un ID que ningún elemento contiene es suficiente, al igual que un elemento de este tipo combinado con ’id_attr’.\n\nCualquier llamador que pase XML no confiable a verify puede recibir un retorno verdadero para un documento en el que no se comprobó ningún digest ni ningún valor de firma; un ancla de confianza ’cert’ o ’cert_text’ no cambia esto, porque no se ejecuta ninguna comprobación de clave. Las versiones hasta la 0.28 usan un verify basado en XML::XPath que no tiene tal omisión y no se ven afectadas."
}
],
"affected": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"affectedData": [
{
"vendor": "TIMLEGGE",
"product": "XML::Sig",
"defaultStatus": "unaffected",
"collectionURL": "https://cpan.org/modules",
"packageName": "XML-Sig",
"programFiles": [
"lib/XML/Sig.pm"
],
"programRoutines": [
{
"name": "XML::Sig::verify"
}
],
"repo": "https://github.com/perl-net-saml2/perl-XML-Sig",
"versions": [
{
"version": "0.29",
"lessThan": "0.72",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-03T20:05:13.814301Z",
"id": "CVE-2026-18568",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-347"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:xml\\:\\:sig_project:xml\\:\\:sig:*:*:*:*:*:perl:*:*",
"versionStartIncluding": "0.29",
"versionEndExcluding": "0.72",
"matchCriteriaId": "B8BBB154-3467-4332-966C-BC32ED6BD2AD"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/perl-net-saml2/perl-XML-Sig/commit/ef22cfed1ac0f29b316d17eb79cf6480e03ae16a.patch",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Patch"
]
},
{
"url": "https://metacpan.org/release/TIMLEGGE/XML-Sig-0.72/changes",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Release Notes"
]
},
{
"url": "https://www.cve.org/CVERecord?id=CVE-2025-40934",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Not Applicable"
]
}
]
}