{"id":"CVE-2023-49087","aliases":["CVE-2023-49087","GHSA-ww7x-3gxh-qm6r"],"related":[],"kind":"vulnerability","state":"published","title":"Validation of SignedInfo","summary":"xml-security is a library that implements XML signatures and encryption. Validation of an XML signature requires verification that the hash value of the related XML-document matches a specific DigestValue-value, but also that the cryptographic signature on the SignedInfo-tree (the one that contains the DigestValue) verifies and matches a trusted public key. If an attacker somehow (i.e. by exploiting a bug in PHP's canonicalization function) manages to manipulate the canonicalized version's DigestValue, it would be possible to forge the signature. This issue has been patched in version 1.6.12 and 5.0.0-alpha.13.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"xml-security is a library that implements XML signatures and encryption. Validation of an XML signature requires verification that the hash value of the related XML-document matches a specific DigestValue-value, but also that the cryptographic signature on the SignedInfo-tree (the one that contains the DigestValue) verifies and matches a trusted public key. If an attacker somehow (i.e. by exploiting a bug in PHP's canonicalization function) manages to manipulate the canonicalized version's DigestValue, it would be possible to forge the signature. This issue has been patched in version 1.6.12 and 5.0.0-alpha.13.","source":"cvelist"},{"lang":"en","text":"Validation of an XML Signature requires verification that the hash value of the related XML-document (after any optional transformations and/or normalizations) matches a specific DigestValue-value, but also that the cryptografic signature on the SignedInfo-tree (the one that contains the DigestValue) verifies and matches a trusted public key.\n\nWithin the simpleSAMLphp/xml-security library (https://github.com/simplesamlphp/xml-security), the hash is being validated using SignedElementTrait::validateReference, and the signature is being verified in SignedElementTrait::verifyInternal\n\nhttps://github.com/simplesamlphp/xml-security/blob/master/src/XML/SignedElementTrait.php:\n\n![afbeelding](https://user-images.githubusercontent.com/841045/285817284-a7b7b3b4-768a-46e8-a34b-61790b6e23a5.png)\n\nWhat stands out is that the signature is being calculated over the canonical version of the SignedInfo-tree. The validateReference method, however, uses the original non-canonicalized version of SignedInfo.\n\n### Impact\nIf an attacker somehow (i.e. by exploiting a bug in PHP's canonicalization function) manages to manipulate the canonicalized version's DigestValue, it would be potentially be possible to forge the signature. No possibilities to exploit this were found during the investigation.","format":"markdown","source":"ghsa"},{"lang":"es","text":"xml-security es una librería que implementa cifrado y firmas XML. La validación de una firma XML requiere verificar que el valor hash del documento XML relacionado coincida con un valor DigestValue específico, pero también que la firma criptográfica en el árbol SignedInfo (el que contiene el DigestValue) verifique y coincida con una clave pública confiable. Si un atacante de alguna manera (es decir, explotando un error en la función de canonicalización de PHP) logra manipular el DigestValue de la versión canonicalizada, sería posible falsificar la firma. Este problema se solucionó en las versiones 1.6.12 y 5.0.0-alpha.13.","source":"nvd"}],"published":"2023-11-28T18:52:19.000Z","modified":"2026-09-10T03:50:04.325Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-345"],"affected":[{"ranges":[{"version":"= 1.6.11","status":"affected"},{"version":"= 5.0.0-alpha.12","status":"affected"}],"vendor":"simplesamlphp","product":"xml-security","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.6.11","status":"affected","fixed":"1.6.12"}],"ecosystem":"Packagist","package":"simplesamlphp/xml-security","purl":"pkg:composer/simplesamlphp/xml-security","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0-alpha.12","status":"affected","fixed":"5.0.0-alpha.13"}],"ecosystem":"Packagist","package":"simplesamlphp/saml2","purl":"pkg:composer/simplesamlphp/saml2","source":"ghsa"},{"ranges":[{"status":"affected","version":"5.0.0"}],"vendor":"simplesamlphp","product":"saml2","cpe":"cpe:2.3:a:simplesamlphp:saml2:5.0.0:alpha12:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.6.11"}],"vendor":"simplesamlphp","product":"xml-security","cpe":"cpe:2.3:a:simplesamlphp:xml-security:1.6.11:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/simplesamlphp/xml-security/security/advisories/GHSA-ww7x-3gxh-qm6r","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simplesamlphp/xml-security/commit/f509e3083dd7870cce5880c804b5122317287581","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49087","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/simplesamlphp/xml-security","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/simplesamlphp/xml-security/blob/master/src/XML/SignedElementTrait.php","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-49087","url":"https://www.cve.org/CVERecord?id=CVE-2023-49087","licence":"CVE Terms of Use","modified":"2024-08-02T21:46:29.195Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ww7x-3gxh-qm6r","url":"https://github.com/advisories/GHSA-ww7x-3gxh-qm6r","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:04.325Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-49087","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49087","licence":"Public domain","modified":"2026-06-17T06:35:20.330Z"}],"updatedAt":"2026-11-25T22:58:30.798Z","epss":{"score":0.00237,"percentile":0.15767,"date":"2026-12-01T12:00:22.000Z"}}