CVE-2025-66578

robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation

Published Dec 9, 2025 CVSS 3.1 · 6 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-c4cc-x928-vjw9 robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation
History
Type Values Removed Values Added
CPEs cpe:2.3:a:xmlseclibs_project:xmlseclibs:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Xmlseclibs Project
Xmlseclibs Project xmlseclibs
Vendors & Products Xmlseclibs Project
Xmlseclibs Project xmlseclibs
Type Values Removed Values Added
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.
Title robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 9, 2025, 3:24 PM
Reserved
Dec 4, 2025, 6:53 PM
Status
Analyzed
Published
Dec 9, 2025, 4:18 PM
Modified
Oct 7, 2026, 8:10 PM