CVE-2025-29774

CVE-2025-29774 is a critical-severity security vulnerability in xml-crypto (npm), affecting versions >= 4.0.0, < 6.0.1. It is fixed in 6.0.1, 3.2.1, 2.1.6.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

xml-crypto Vulnerable to XML Signature Verification Bypass via Multiple SignedInfo References

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.

Multiple SignedInfo Nodes

There should not be more than one SignedInfo node inside a Signature. If you find multiple SignedInfo nodes, it could indicate an attack.

<Signature>
    <SomeNode>
      <SignedInfo>
        <Reference URI="somefakereference">
          <DigestValue>forgeddigestvalue</DigestValue>
        </Reference>
      </SignedInfo>
    </SomeNode>
    <SignedInfo>
        <Reference URI="realsignedreference">
          <DigestValue>realdigestvalue</DigestValue>
        </Reference>
      </SignedInfo>
    </SignedInfo>
</Signature>

Code to test

Pass in the decrypted version of the document

decryptedDocument = ... // yours to implement

// This check is per-Signature node, not per-document
const signedInfoNodes = xpath.select(".//*[local-name(.)='SignedInfo']", signatureNode);

if (signedInfoNodes.length === 0) {
  // Not necessarily a compromise, but invalid. Should contain exactly one SignedInfo node
  // Yours to implement
}

if (signedInfoNodes.length > 1) {
  // Compromise detected, yours to implement
}

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 with a valid account to escalate privileges or impersonate another user.

Affected versions

xml-crypto (>= 4.0.0, < 6.0.1) xml-crypto (>= 3.0.0, < 3.2.1) xml-crypto (< 2.1.6)

Security releases

xml-crypto → 6.0.1 (npm) xml-crypto → 3.2.1 (npm) xml-crypto → 2.1.6 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2025-29774? CVE-2025-29774 is a critical-severity security vulnerability in xml-crypto (npm), affecting versions >= 4.0.0, < 6.0.1. It is fixed in 6.0.1, 3.2.1, 2.1.6.
  2. Which versions of xml-crypto are affected by CVE-2025-29774? xml-crypto (npm) versions >= 4.0.0, < 6.0.1 is affected.
  3. Is there a fix for CVE-2025-29774? Yes. CVE-2025-29774 is fixed in 6.0.1, 3.2.1, 2.1.6. Upgrade to this version or later.
  4. Is CVE-2025-29774 exploitable, and should I be worried? Whether CVE-2025-29774 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-29774 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-29774?
    • Upgrade xml-crypto to 6.0.1 or later
    • Upgrade xml-crypto to 3.2.1 or later
    • Upgrade xml-crypto to 2.1.6 or later

Other vulnerabilities in xml-crypto

Stop the waste.
Protect your environment with Kodem.