CVE-2017-12972 Nimbus JOSE+JWT missing overflow check

High 7.5 Published Updated

Attackers can bypass HMAC verification in Nimbus JOSE+JWT by exploiting an integer overflow during length conversion, allowing them to forge valid tokens.

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

What is CVE-2017-12972?

CVE-2017-12972 is a high-severity vulnerability in n/a, published on 20 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In Nimbus JOSE+JWT before 4.39, there is no integer-overflow check when converting length values from bytes to bits, which allows attackers to conduct HMAC bypass attacks by shifting Additional Authenticated Data (AAD) and ciphertext so that different plaintext is obtained for the same HMAC.

Weakness: CWE-345

Which versions are affected by CVE-2017-12972?

2 open source packages ship an affected version, including com.nimbusds:nimbus-jose-jwt. It affects 1 product.

PackageAffectedFixed in
com.nimbusds:nimbus-jose-jwt MavenAll versions4.39
com.nimbusds:nimbus-jose-jwt MavenAll versions4.39

Products include Connect2id Nimbus Jose\+jwt.

How do I fix CVE-2017-12972?

Upgrade com.nimbusds:nimbus-jose-jwt to 4.39 or later.

Is CVE-2017-12972 being exploited?

There is no known exploitation of CVE-2017-12972 in the wild and no public exploit code.

Sources

Also known as GHSA-2qp9-wg27-9pcv.

Is CVE-2017-12972 in your software?

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

Check your SBOMs for free