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

CVE-2025-66578 · Severity: medium · CVSS 6 · Published 2025-12-09

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.

Technologies: robrichards/xmlseclibs (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2025-66578 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-66578 being exploited in the wild.
How severe is CVE-2025-66578?
Medium severity, with a CVSS score of 6, published 9 December 2025.
Which products and versions are affected?
robrichards/xmlseclibs (Packagist) ECOSYSTEM:introduced=0,fixed=3.1.4.
Is there a fix for CVE-2025-66578?
Yes. robrichards/xmlseclibs (Packagist): upgrade to 3.1.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2025-66578?
Check whether you run robrichards/xmlseclibs (Packagist) or Xmlseclibs Project Xmlseclibs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • robrichards/xmlseclibs (Packagist): upgrade to 3.1.4 or later
    composer require robrichards/xmlseclibs:^3.1.4

Affected products

  • robrichards/xmlseclibs (Packagist) ECOSYSTEM:introduced=0,fixed=3.1.4
  • Xmlseclibs Project Xmlseclibs

Identifiers

  • CVE-2025-66578
  • GHSA-c4cc-x928-vjw9

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.