CVE-2025-29774: xml-crypto XML Signature Verification Bypass Vulnerability

xml-crypto Updated 14 Dec 2025

Summary

14/03/2025
Yes i
Critical
9.3

CVE-2025-29774: xml-crypto Vulnerable to XML Signature Verification Bypass via Multiple SignedInfo References. Affects xml-crypto across 3 version ranges.

< 2.1.6 >= 3.0.0, < 3.2.1 >= 4.0.0, < 6.0.1

Fixed in 2.1.6, 3.2.1 or 6.0.1, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

xml-crypto is an open-source library used for XML digital signatures in Node.js applications. It provides functionalities to create and verify XML signatures, ensuring the integrity and authenticity of XML documents. However, the library is vulnerable to a critical issue that allows attackers to bypass signature verification, potentially compromising the security of systems relying on it.

Vulnerability Detail

The vulnerability in xml-crypto arises from its handling of XML Signature elements, specifically allowing multiple SignedInfo nodes within a single Signature. This flaw can be exploited by attackers to modify signed XML messages in a way that still passes signature verification checks. As a result, an attacker could alter critical identity or access control attributes, enabling privilege escalation or user impersonation. The vulnerability affects all versions of xml-crypto up to and including 6.0.0.

How To Fix

Latest published version: 6.4.0 as of 23 Oct 2026

npm install xml-crypto@6.4.0

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.1.6 2.1.6
    npm install xml-crypto@2.1.6
  • >= 3.0.0, < 3.2.1 3.2.1
    npm install xml-crypto@3.2.1
  • >= 4.0.0, < 6.0.1 6.0.1
    npm install xml-crypto@6.0.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If immediate upgrading is not possible, you can implement a check in your code to ensure that there is only one SignedInfo node per Signature. Use the following code snippet to validate the SignedInfo nodes:

const signedInfoNodes = xpath.select(".//*[local-name(.)='SignedInfo']", signatureNode);
if (signedInfoNodes.length === 0) {
  // Not necessarily a compromise, but invalid. Should contain exactly one SignedInfo node
}
if (signedInfoNodes.length > 1) {
  // Compromise detected, take appropriate action
}

Conclusion

The xml-crypto library has a critical vulnerability that allows for XML Signature Verification Bypass, posing significant security risks. It is essential to upgrade to the patched versions to safeguard your applications. Additionally, using tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for xml-crypto →

Share this vulnerability

FAQ

The vulnerability allows attackers to bypass authentication and authorization mechanisms, potentially leading to privilege escalation or user impersonation.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

All versions of xml-crypto up to and including 6.0.0 are affected. Versions 2.x and 3.x also have specific patched versions.

You can upgrade xml-crypto using npm with the command: npm install xml-crypto@6.0.1 for version 6.x, or the respective patched versions for 2.x and 3.x.

Implement a check in your code to ensure that there is only one SignedInfo node per Signature to mitigate the risk until you can upgrade.

Related vulnerabilities

Recent vulnerabilities recorded for xml-crypto.

How To Fix

Latest published version: 6.4.0 as of 23 Oct 2026

npm install xml-crypto@6.4.0

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.1.6 2.1.6
    npm install xml-crypto@2.1.6
  • >= 3.0.0, < 3.2.1 3.2.1
    npm install xml-crypto@3.2.1
  • >= 4.0.0, < 6.0.1 6.0.1
    npm install xml-crypto@6.0.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback