# GHSA-c27r-x354-4m68: xml-crypto's HMAC-SHA1 signatures can bypass validation via key confusion

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-10-27T20:39:46.000Z
- Modified: 2022-08-02T20:03:05.000Z
- Weaknesses: CWE-287

## Description

### 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.

(As written by GitHub Advisory Database.)

## Affected

- xml-crypto (npm): before 2.0.0

## References

- <https://github.com/yaronn/xml-crypto/security/advisories/GHSA-c27r-x354-4m68> (web)
- <https://github.com/yaronn/xml-crypto/commit/3d9db712e6232c765cd2ad6bd2902b88a0d22100> (web)
- <https://github.com/yaronn/xml-crypto> (package)
- <https://www.npmjs.com/package/xml-crypto> (web)

## Sources

- GitHub Advisory Database: [GHSA-c27r-x354-4m68](https://github.com/advisories/GHSA-c27r-x354-4m68), CC-BY-4.0, modified 2022-08-02

---

Page: https://cve.day/GHSA-c27r-x354-4m68 · Whole record: https://cve.day/GHSA-c27r-x354-4m68.json · Rebuilt by cve.day 2026-11-25T22:56:45.003Z
