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

Not scored Published

Attackers can bypass XML signature validation by injecting HMAC-SHA1 signatures using only the RSA public key, compromising integrity checks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-c27r-x354-4m68?

GHSA-c27r-x354-4m68 is a vulnerability in xml-crypto, published on 27 Oct 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Which versions are affected by GHSA-c27r-x354-4m68?

2 open source packages ship an affected version, including xml-crypto.

PackageAffectedFixed in
xml-crypto npmAll versions2.0.0
xml-crypto npmAll versions2.0.0

How do I fix GHSA-c27r-x354-4m68?

Upgrade xml-crypto to 2.0.0 or later.

Is GHSA-c27r-x354-4m68 being exploited?

There is no known exploitation of GHSA-c27r-x354-4m68 in the wild and no public exploit code.

Sources

Is GHSA-c27r-x354-4m68 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free