xml-crypto's HMAC-SHA1 signatures can bypass validation via key confusionGHSA-c27r-x354-4m68
Fix: yaronn/xml-crypto@3d9db71GHSA-c27r-x354-4m68 is a security vulnerability in xml-crypto. A fix is available for xml-crypto — see the affected versions and patch details below.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
xml-cryptonpmDescription
Impact
An attacker can inject an HMAC-SHA1 signature that is valid using only knowledge of the RSA public key. This allows bypassing signature validation.
Patches
Version 2.0.0 has the fix.
Workarounds
The recommendation is to upgrade. In case that is not possible remove the 'http://www.w3.org/2000/09/xmldsig#hmac-sha1' entry from SignedXml.SignatureAlgorithms.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | xml-crypto | all versions | 2.0.0npm install xml-crypto@2.0.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for xml-crypto, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update xml-crypto to 2.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c27r-x354-4m68 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-c27r-x354-4m68 in your dependencies?
Find it across npm, including transitive dependencies.