CVE-2025-22149 JWK Set's HTTP client only overwrites and appends JWK to local cache during refresh

Low 2.1 Published Updated

Attackers can bypass key revocation in the JWK Set Go library's auto-caching client because stale keys are not removed from the local cache.

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

What is CVE-2025-22149?

CVE-2025-22149 is a low-severity vulnerability in MicahParks jwkset, published on 9 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

JWK Set (JSON Web Key Set) is a JWK and JWK Set Go implementation. Prior to 0.6.0, the project's provided HTTP client's local JWK Set cache should do a full replacement when the goroutine refreshes the remote JWK Set. The current behavior is to overwrite or append. This is a security issue for use cases that utilize the provided auto-caching HTTP client and where key removal from a JWK Set is equivalent to revocation. The affected auto-caching HTTP client was added in version v0.5.0 and fixed in v0.6.0. The only workaround would be to remove the provided auto-caching HTTP client and replace it with a custom implementation. This involves setting the HTTPClientStorageOptions.RefreshInterval to zero (or not specifying the value).

Weakness: CWE-672

Which versions are affected by CVE-2025-22149?

3 open source packages ship an affected version, including github.com/MicahParks/jwkset.

PackageAffectedFixed in
github.com/MicahParks/jwkset GoFrom 0.5.00.6.0
github.com/MicahParks/jwkset GoFrom 0.5.00.6.0
github.com/MicahParks/jwkset GoFrom 0.5.00.6.0

How do I fix CVE-2025-22149?

Upgrade github.com/MicahParks/jwkset to 0.6.0 or later.

Is CVE-2025-22149 being exploited?

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

Sources

Also known as GHSA-675f-rq2r-jw82, GO-2025-3376.

Is CVE-2025-22149 in your software?

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

Check your SBOMs for free