CVE-2024-51744: Bad documentation of error handling in ParseWithClaims can lead to potentially dangerous situations in golang-jwt
Vulnerability summary
CVE-2024-51744 is a low (CVSS 3.1) vulnerability in golang-jwt jwt. EPSS estimates a 0.58% chance of exploitation in the next 30 days, higher than 47.9% of scored vulnerabilities.
Not severe (CVSS 3.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 14 · Related 140Showing 100 of 141.
Timeline
- 04-11-2024PublishedVulnerability first disclosed.
- 05-11-2024Last modifiedVulnerability information updated.
Description
golang-jwt is a Go implementation of JSON Web Tokens. Unclear documentation of the error behavior in `ParseWithClaims` can lead to situation where users are potentially not checking errors in the way they should be. Especially, if a token is both expired and invalid, the errors returned by `ParseWithClaims` return both error codes. If users only check for the `jwt.ErrTokenExpired ` using `error.Is`, they will ignore the embedded `jwt.ErrTokenSignatureInvalid` and thus potentially accept invalid tokens. A fix has been back-ported with the error handling logic from the `v5` branch to the `v4` branch. In this logic, the `ParseWithClaims` function will immediately return in "dangerous" situations (e.g., an invalid signature), limiting the combined errors only to situations where the signature is valid, but further validation failed (e.g., if the signature is valid, but is expired AND has the wrong audience). This fix is part of the 4.5.1 release. We are aware that this changes the behaviour of an established function and is not 100 % backwards compatible, so updating to 4.5.1 might break your code. In case you cannot update to 4.5.0, please make sure that you are properly checking for all errors ("dangerous" ones first), so that you are not running in the case detailed above.
CVSS metrics
8 scores · 7 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- OSV · DebianEcosystem advisory · calculated3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- OSV · WolfiEcosystem advisory · calculated3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- OSV · GoEcosystem advisory · calculated3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- OSV · ChainguardEcosystem advisory · calculated3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- NVDNIST3.1LowCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
EPSS trend
Probability
0.58%
Chance of exploitation in the next 30 days
Percentile
48%
Versus all other CVEs
30-day change
Increase +0.07 pp
From 0.51% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard200 products
- aactl< 0.4.12-r19
- actions-runner-controller< 0.9.3-r3
- actions-runner-controller-compat< 0.9.3-r3
- actions-runner-controller-fips< 0.9.3-r3
- actions-runner-controller-fips-compat< 0.9.3-r3
1 vendor · 200 products · Showing 200 of 545
References
19 links- github.com/golang-jwt/jwt/security/advisories/GHSA-29wx-vh33-7x7rX Refsource CONFIRMREPORTAdvisoryWEB
- github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2cX Refsource MISCREPORTFIXWEB
- lists.opensuse.org/archives/…Advisory
Show all 19 references
- github.com/golang-jwt/jwtPACKAGE
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory