Critical

xml-crypto Vulnerable to XML Signature Verification Bypass via DigestValue Comment

  • Disclosed: 14.03.2025
  • Updated: 11.10.2026 10:22

Impact

An attacker may be able to exploit this vulnerability to bypass authentication or authorization mechanisms in systems that rely on xml-crypto for verifying signed XML documents. The vulnerability allows an attacker to modify a valid signed XML message in a way that still passes signature verification checks. For example, it could be used to alter critical identity or access control attributes, enabling an attacker to escalate privileges or impersonate another user.

Patches

All versions <= 6.0.0 are affected. Please upgrade to version 6.0.1.

If you are still using v2.x or v3.x please upgrade to the associated patch version.

Indicators of Compromise

When logging XML payloads, check for the following indicators. If the payload includes encrypted elements, ensure you analyze the decrypted version for a complete assessment. (If encryption is not used, analyze the original XML document directly). This applies to various XML-based authentication and authorization flows, such as SAML Response payloads.

Presence of Comments in DigestValue

A DigestValue should not contain comments. If you find comments within it, this may indicate tampering.

Example of a compromised DigestValue:

xml
<DigestValue>
    <!--TBlYWE0ZWM4ODI1NjliYzE3NmViN2E1OTlkOGDhhNmI=-->
    c7RuVDYo83z2su5uk0Nla8DXcXvKYKgf7tZklJxL/LZ=
</DigestValue>

Code to test

Pass in the decrypted version of the document

js
decryptedDocument = ... // yours to implement

const digestValues = xpath.select(
  "//*[local-name()='DigestValue'][count(node()) > 1]",
  decryptedDocument,
);

if (digestValues.length > 0) {
  // Compromise detected, yours to implement
}

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package xml-crypto >= 4.0.0, < 6.0.1, >= 3.0.0, < 3.2.1, < 2.1.6 6.0.1, 3.2.1, 2.1.6

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-347
Platform
npm
Package
xml-crypto
Disclosed
14.03.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-x3m8-899r-f7c3 - CC BY 4.0

Vulnerability history: xml-crypto

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
10.2020 03.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 3
  • High 1

Disclosures per year

  1. 2020: 1
  2. 2021: 0
  3. 2022: 0
  4. 2023: 0
  5. 2024: 1
  6. 2025: 2
  7. 2026: 0
  1. xml-crypto Vulnerable to XML Signature Verification Bypass via DigestValue Comment this entry
    Critical CVE-2025-29775 >= 4.0.0, < 6.0.1, >= 3.0.0, < 3.2.1, < 2.1.6 6.0.1, 3.2.1, 2.1.6
  2. Critical CVE-2025-29774 >= 4.0.0, < 6.0.1, >= 3.0.0, < 3.2.1, < 2.1.6 6.0.1, 3.2.1, 2.1.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.