CVE-2025-66578: Robrichards/xmlseclibs Robrichards/xmlseclibs Has An Libxml2 Canonicalization Vulnerability
MODERATECVE-2025-66578 is a MODERATE (CVSS 6.0) robrichards/xmlseclibs has an libxml2 canonicalization vulnerability (CWE-248: Uncaught Exception) affecting Robrichards/xmlseclibs libraries in the Packagist ecosystem. The issue involves robrichards/xmlseclibs has an libxml2 canonicalization error which can bypass digest/signature validation. Remediation is available by upgrading affected packages to version 3.1.4.
CVE-2025-66578 at a Glance
Security Impact
CVSS: 6.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L).
How to Fix CVE-2025-66578
To remediate this vulnerability, upgrade all affected Robrichards/xmlseclibs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade robrichards/xmlseclibs to 3.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for robrichards/xmlseclibs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-66578, inspect your project dependencies for Robrichards/xmlseclibs:
inspect dependencies for robrichards/xmlseclibs
Analyze the terminal output to locate any version of Robrichards/xmlseclibs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Robrichards/xmlseclibs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66578 Affected Robrichards/xmlseclibs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
robrichards/xmlseclibs
|
Packagist |
< 3.1.4
|
3.1.4
|
References
Frequently Asked Questions
What is CVE-2025-66578?
Which Robrichards/xmlseclibs versions are affected?
What version fixes CVE-2025-66578?
Is robrichards/xmlseclibs affected?
What is the CVSS score of CVE-2025-66578?
What CWE is associated with CVE-2025-66578?
How can I check Packagist dependencies for CVE-2025-66578?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c4cc-x928-vjw9",
"modified" : "2025-12-09T19:17:52Z",
"published" : "2025-12-08T17:57:33Z",
"aliases" : [ "CVE-2025-66578" ],
"summary" : "robrichards/xmlseclibs has an Libxml2 Canonicalization error which can bypass Digest/Signature validation",
"details" : "### Summary\nAn authentication bypass vulnerability exists due to a flaw in the libxml2 canonicalization process, which is used by [xmlseclibs](https://github.com/robrichards/xmlseclibs) during document transformation. This weakness allows an attacker to generate a valid signature once and reuse it indefinitely. In practice, a signature created during a previous interaction - or through a misconfigured authentication flow - can be replayed to bypass authentication checks.\n\n### Details\nWhen libxml2’s canonicalization is invoked on an invalid XML input, it may return an empty string rather than a canonicalized node. [xmlseclibs](https://github.com/robrichards/xmlseclibs) then proceeds to compute the DigestValue over this empty string, treating it as if canonicalization succeeded.\n\nhttps://github.com/robrichards/xmlseclibs/blob/f4131320c6dcd460f1b0c67f16f8bf24ce4b5c3e/src/XMLSecurityDSig.php#L296\n\n### Impact\nDigest bypass: By crafting input that causes canonicalization to yield an empty string, the attacker can manipulate validation to pass incorrectly.\n\nSignature replay on empty canonical form: If an empty string has been signed once (e.g., in a prior interaction or via a misconfigured flow), that signature can potentially be replayed to bypass authentication.\n\n### Suggested remediation\nTreat canonicalization failures (exceptions or nil/empty outputs) as fatal and abort validation.\nAdd explicit checks: reject when canonicalize returns nil/empty or raise",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "robrichards/xmlseclibs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/robrichards/xmlseclibs/security/advisories/GHSA-c4cc-x928-vjw9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66578"
}, {
"type" : "WEB",
"url" : "https://github.com/robrichards/xmlseclibs/commit/69fd63080bc47a8d51bc101c30b7cb756862d1d6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/robrichards/xmlseclibs"
}, {
"type" : "WEB",
"url" : "https://github.com/robrichards/xmlseclibs/blob/f4131320c6dcd460f1b0c67f16f8bf24ce4b5c3e/src/XMLSecurityDSig.php#L296"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-08T17:57:33Z",
"nvd_published_at" : "2025-12-09T16:18:21Z"
}
}