# CVE-2025-66578: robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation

- Severity: Medium 6.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-12-08T17:57:33.000Z
- Modified: 2026-10-07T20:10:01.970Z
- Also known as: GHSA-c4cc-x928-vjw9
- Weaknesses: CWE-248
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

xmlseclibs is a library written in PHP for working with XML Encryption and Signatures. Versions 3.1.3 contain an authentication bypass vulnerability due to a flaw in the libxml2 canonicalization process during document transformation. When libxml2’s canonicalization is invoked on an invalid XML input, it may return an empty string rather than a canonicalized node. xmlseclibs then proceeds to compute the DigestValue over this empty string, treating it as if canonicalization succeeded. This issue is fixed in version 3.1.4. Workarounds include treating canonicalization failures (exceptions or nil/empty outputs) as fatal and aborting validation, and/or adding explicit checks to reject when canonicalize returns nil/empty or raises errors.

(As written by CVE List.)

## Affected

- robrichards xmlseclibs: < 3.1.4
- robrichards/xmlseclibs (Packagist): before 3.1.4
- xmlseclibs_project xmlseclibs: before 3.1.4

## Every score

- GitHub_M: CVSS:3.1 6.0 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L`
- GitHub: CVSS:3.1 6.0 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/robrichards/xmlseclibs/security/advisories/GHSA-c4cc-x928-vjw9> (exploit, vendor-advisory, web)
- <https://github.com/robrichards/xmlseclibs/commit/69fd63080bc47a8d51bc101c30b7cb756862d1d6> (patch, web)
- <https://github.com/robrichards/xmlseclibs/blob/f4131320c6dcd460f1b0c67f16f8bf24ce4b5c3e/src/XMLSecurityDSig.php#L296> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-66578> (advisory)
- <https://github.com/robrichards/xmlseclibs> (package)

## Sources

- CVE List: [CVE-2025-66578](https://www.cve.org/CVERecord?id=CVE-2025-66578), CVE Terms of Use, modified 2025-12-09
- GitHub Advisory Database: [GHSA-c4cc-x928-vjw9](https://github.com/advisories/GHSA-c4cc-x928-vjw9), CC-BY-4.0, modified 2025-12-09
- NVD: [CVE-2025-66578](https://nvd.nist.gov/vuln/detail/CVE-2025-66578), Public domain, modified 2026-10-07

---

Page: https://cve.day/CVE-2025-66578 · Whole record: https://cve.day/CVE-2025-66578.json · Rebuilt by cve.day 2026-11-25T22:59:08.541Z
