CVE-2024-51744golang-jwt jwt
Low 3.1 No auth needed
Follow: this CVE · golang-jwt · golang-jwt jwt We alert you by email or Slack (account required).
- Priority
- 34
- CVSS 3.1
- 3.1
- EPSS
- 0.6% probability of exploitation in 30 days · percentile 46
- Auth required
- No
- Published
- Nov 4, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-755
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for jwt.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/golang-jwt/jwt/v4 |
< 4.5.1 |
4.5.1 |
go get github.com/golang-jwt/jwt/v4@v4.5.1 |
| Go | github.com/golang-jwt/jwt/v4 |
< 4.5.1 |
4.5.1 |
go get github.com/golang-jwt/jwt/v4@v4.5.1 |
Per OSV / GitHub Advisories (GHSA-29wx-vh33-7x7r, GO-2024-3250). Check the version in your lockfile before upgrading.
Affected products
- golang-jwt · jwt
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- kubectl-retina-1.3.1-1.1 on GA media · SUSE · openSUSE-SU-2026:12297-1 · Oct 27, 2026 Critical
- kumactl-3.0.0-1.1 on GA media · SUSE · openSUSE-SU-2026:12300-1 · Oct 27, 2026 Critical
- flannel-0.28.10-1.1 on GA media · SUSE · openSUSE-SU-2026:12270-1 · Oct 26, 2026 High
- Red Hat Security Advisory: Red Hat Ceph Storage 7.1 security and bug fix updates · Red Hat · RHSA-2026:2769 · Apr 4, 2026 High
Also: SUSE (+1)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.