CVE-2024-28122 JWX vulnerable to a denial of service attack using compressed JWE message

Medium 6.8 Published Updated

An attacker can cause a denial of service in the JWX Go library by sending a maliciously compressed JWE token, requiring an upgrade to patched versions.

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

What is CVE-2024-28122?

CVE-2024-28122 is a medium-severity denial of service vulnerability in lestrrat-go jwx, published on 9 Mar 2024. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

JWX is Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. This vulnerability allows an attacker with a trusted public key to cause a Denial-of-Service (DoS) condition by crafting a malicious JSON Web Encryption (JWE) token with an exceptionally high compression ratio. This issue has been patched in versions 1.2.29 and 2.0.21.

Weakness: CWE-400

Which versions are affected by CVE-2024-28122?

6 open source packages ship an affected version, including github.com/lestrrat-go/jwx and github.com/lestrrat-go/jwx/v2. It affects 1 product.

PackageAffectedFixed in
github.com/lestrrat-go/jwx GoAll versions1.2.29
github.com/lestrrat-go/jwx GoAll versions1.2.29
github.com/lestrrat-go/jwx GoAll versions1.2.29
github.com/lestrrat-go/jwx/v2 GoAll versions2.0.21
github.com/lestrrat-go/jwx/v2 GoAll versions2.0.21
github.com/lestrrat-go/jwx/v2 GoAll versions2.0.21

Products include Lestrrat-Go Jwx.

How do I fix CVE-2024-28122?

Upgrade github.com/lestrrat-go/jwx to 1.2.29 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-28122 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-28122 exists.

Sources

Also known as GHSA-hj3v-m684-v259, GO-2024-2632, MINI-2268-jc36-p9mc, MINI-44w4-g8rh-fch5, MINI-7cqx-pcq2-4wr4, MINI-ffmj-967w-w75h and 8 more.

Is CVE-2024-28122 in your software?

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

Check your SBOMs for free