{"id":"CVE-2024-32962","aliases":["EUVD-2024-1373","GHSA-2xp3-57p7-qf4v"],"status":"published","title":"XML signature verification bypass due improper verification of signature / signature spoofing","description":"xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of the w3 xmldsig-core-20080610 spec. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks. As a result `xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`. `xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.  An attacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element. This vulnerability is combination of changes introduced to `4.0.0` on pull request 301 / commit `c2b83f98` and has been addressed in version 6.0.0 with pull request 445 / commit `21201723d`. Users are advised to upgrade. Users unable to upgrade may either check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation or set `xml-crypto's getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.","severity":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00833,"percentile":0.5807,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-347"],"published":"2024-05-01T17:05:53Z","modified":"2026-10-28T02:30:29Z","exploits":[{"source":"pocgithub","id":"absholi7ly/Poc-CVE-2024-32962-xml-crypto","title":"absholi7ly/Poc-CVE-2024-32962-xml-crypto","date":"2025-03-20","url":"https://github.com/absholi7ly/Poc-CVE-2024-32962-xml-crypto"}],"fixes":[{"ecosystem":"npm","package":"xml-crypto","fixed_in":["6.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"xml-crypto","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"6.0.0"}]}]},{"source":"osv","ecosystem":"npm","package":"xml-crypto","ranges":[{"type":"SEMVER","events":[{"introduced":"4.0.0"},{"fixed":"6.0.0"}]}]}],"products":[{"vendor":"node-saml","product":"xml-crypto"},{"vendor":"node_saml_project","product":"xml_crypto"}],"references":[{"url":"https://github.com/node-saml/xml-crypto/security/advisories/GHSA-2xp3-57p7-qf4v","tags":["x_refsource_CONFIRM","x_transferred","advisory","web"]},{"url":"https://github.com/node-saml/xml-crypto/pull/301","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/node-saml/xml-crypto/pull/445","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/node-saml/xml-crypto/commit/21201723d2ca9bc11288f62cf72552b7d659b000","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/node-saml/xml-crypto/commit/c2b83f984049edb68ad1d7c6ad0739ec92af11ca","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-CoreValidation","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://security.netapp.com/advisory/ntap-20240705-0003/","tags":["x_transferred","advisory"]},{"url":"https://github.com/node-saml/xml-crypto/discussions/399","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32962","tags":["advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20240705-0003","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2xp3-57p7-qf4v"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32962.json","tags":["advisory"]},{"url":"https://github.com/node-saml/xml-crypto","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-32962","title":"XML signature verification bypass due improper verification of signature / signature spoofing","description":"xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of the w3 xmldsig-core-20080610 spec. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks. As a result `xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`. `xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.  An attacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element. This vulnerability is combination of changes introduced to `4.0.0` on pull request 301 / commit `c2b83f98` and has been addressed in version 6.0.0 with pull request 445 / commit `21201723d`. Users are advised to upgrade. Users unable to upgrade may either check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation or set `xml-crypto's getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.","status":"published","published":"2024-05-02T06:48:55.906Z","modified":"2025-02-13T17:52:18.895Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna"}],"cwes":["CWE-347"],"updated_at":"2026-11-02T14:34:16.007021Z"}],"euvd":[{"id":"EUVD-2024-1373","description":"xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of the w3 xmldsig-core-20080610 spec. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks. As a result `xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`. `xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.  An attacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element. This vulnerability is combination of changes introduced to `4.0.0` on pull request 301 / commit `c2b83f98` and has been addressed in version 6.0.0 with pull request 445 / commit `21201723d`. Users are advised to upgrade. Users unable to upgrade may either check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation or set `xml-crypto's getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.","status":"published","published":"2024-05-02T06:48:55Z","modified":"2025-02-13T17:52:18Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T20:53:31.829035Z"}],"ghsa":[{"id":"GHSA-2xp3-57p7-qf4v","title":"xml-crypto vulnerable to XML signature verification bypass due improper verification of signature/signature spoofing","description":"### Summary\n\nDefault configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-CoreValidation. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks.\n\n### Details\n\nAffected `xml-crypto` versions between versions `\u003e= 4.0.0` and `\u003c 6.0.0`. \n\n`xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`.\n\n`xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.\n\nAttacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element.\n\nVulnerability is combination of changes introduced to `4.0.0` at\n* https://github.com/node-saml/xml-crypto/pull/301\n* https://github.com/node-saml/xml-crypto/commit/c2b83f984049edb68ad1d7c6ad0739ec92af11ca\n\nChanges at PR provided default method to extract certificate from signed XML document.\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L405-L414\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L334\n\nand changes at PR prefer output of that method to be used as certificate for signature verification even in the case when library is configured to use specific/pre-configured `signingCert`\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L507\n\nName of the `signingCert` was changed later (but prior to `4.0.0` release) to `publicCert`:\n* https://github.com/node-saml/xml-crypto/commit/78329fbae34c9b25ba25882604e960f506d7c0e7\n* https://github.com/node-saml/xml-crypto/blob/78329fbae34c9b25ba25882604e960f506d7c0e7/lib/signed-xml.js#L507\n\nIssue was fixed to `6.0.0` by disabling implicit usage of default `getCertFromKeyInfo` implementation:\n* https://github.com/node-saml/xml-crypto/pull/445\n* https://github.com/node-saml/xml-crypto/commit/21201723d2ca9bc11288f62cf72552b7d659b000\n\nPossible workarounds for versions 4.x and 5.x:\n- Check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation.\n- Set `xml-crypto`'s `getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.\n\n### PoC\n\nhttps://github.com/node-saml/xml-crypto/discussions/399\n\n### Impact\n\nAn untrusted certificate can be used to pass a malicious XML payload through an improperly configured installation of `xml-crypto`.\n","status":"published","published":"2024-05-01T17:05:53Z","modified":"2024-07-05T18:35:15Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-347"],"updated_at":"2026-11-02T14:37:55.455438Z"}],"nvd":[{"id":"CVE-2024-32962","description":"xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of the w3 xmldsig-core-20080610 spec. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks. As a result `xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`. `xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.  An attacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element. This vulnerability is combination of changes introduced to `4.0.0` on pull request 301 / commit `c2b83f98` and has been addressed in version 6.0.0 with pull request 445 / commit `21201723d`. Users are advised to upgrade. Users unable to upgrade may either check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation or set `xml-crypto's getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.","status":"published","published":"2024-05-02T07:15:21.42Z","modified":"2026-06-17T07:30:46.75Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"secondary"}],"cwes":["CWE-347"],"updated_at":"2026-11-02T14:09:56.122111Z"}],"osv":[{"id":"CVE-2024-32962","title":"XML signature verification bypass due improper verification of signature / signature spoofing","description":"xml-crypto is an xml digital signature and encryption library for Node.js. In affected versions the default configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of the w3 xmldsig-core-20080610 spec. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks. As a result `xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`. `xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.  An attacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element. This vulnerability is combination of changes introduced to `4.0.0` on pull request 301 / commit `c2b83f98` and has been addressed in version 6.0.0 with pull request 445 / commit `21201723d`. Users are advised to upgrade. Users unable to upgrade may either check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation or set `xml-crypto's getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.","status":"published","published":"2024-05-02T06:48:55.906Z","modified":"2026-10-28T02:30:29.39738904Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-347"],"updated_at":"2026-11-02T15:44:40.391953Z"},{"id":"GHSA-2xp3-57p7-qf4v","title":"xml-crypto vulnerable to XML signature verification bypass due improper verification of signature/signature spoofing","description":"### Summary\n\nDefault configuration does not check authorization of the signer, it only checks the validity of the signature per section 3.2.2 of https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-CoreValidation. As such, without additional validation steps, the default configuration allows a malicious actor to re-sign an XML document, place the certificate in a `\u003cKeyInfo /\u003e` element, and pass `xml-crypto` default validation checks.\n\n### Details\n\nAffected `xml-crypto` versions between versions `\u003e= 4.0.0` and `\u003c 6.0.0`. \n\n`xml-crypto` trusts by default any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e`.\n\n`xml-crypto` prefers to use any certificate provided via digitally signed XML document's `\u003cKeyInfo /\u003e` even if library was configured to use specific certificate (`publicCert`) for signature verification purposes.\n\nAttacker can spoof signature verification by modifying XML document and replacing existing signature with signature generated with malicious private key (created by attacker) and by attaching that private key's certificate to `\u003cKeyInfo /\u003e` element.\n\nVulnerability is combination of changes introduced to `4.0.0` at\n* https://github.com/node-saml/xml-crypto/pull/301\n* https://github.com/node-saml/xml-crypto/commit/c2b83f984049edb68ad1d7c6ad0739ec92af11ca\n\nChanges at PR provided default method to extract certificate from signed XML document.\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L405-L414\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L334\n\nand changes at PR prefer output of that method to be used as certificate for signature verification even in the case when library is configured to use specific/pre-configured `signingCert`\n* https://github.com/node-saml/xml-crypto/blob/c2b83f984049edb68ad1d7c6ad0739ec92af11ca/lib/signed-xml.js#L507\n\nName of the `signingCert` was changed later (but prior to `4.0.0` release) to `publicCert`:\n* https://github.com/node-saml/xml-crypto/commit/78329fbae34c9b25ba25882604e960f506d7c0e7\n* https://github.com/node-saml/xml-crypto/blob/78329fbae34c9b25ba25882604e960f506d7c0e7/lib/signed-xml.js#L507\n\nIssue was fixed to `6.0.0` by disabling implicit usage of default `getCertFromKeyInfo` implementation:\n* https://github.com/node-saml/xml-crypto/pull/445\n* https://github.com/node-saml/xml-crypto/commit/21201723d2ca9bc11288f62cf72552b7d659b000\n\nPossible workarounds for versions 4.x and 5.x:\n- Check the certificate extracted via `getCertFromKeyInfo` against trusted certificates before accepting the results of the validation.\n- Set `xml-crypto`'s `getCertFromKeyInfo` to `() =\u003e undefined` forcing `xml-crypto` to use an explicitly configured `publicCert` or `privateKey` for signature verification.\n\n### PoC\n\nhttps://github.com/node-saml/xml-crypto/discussions/399\n\n### Impact\n\nAn untrusted certificate can be used to pass a malicious XML payload through an improperly configured installation of `xml-crypto`.\n","status":"published","published":"2024-05-01T17:05:53Z","modified":"2026-09-10T03:50:12.986760516Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-347"],"updated_at":"2026-11-02T15:46:35.050232Z"}]}}
