# CVE-2024-51744: Bad documentation of error handling in ParseWithClaims can lead to potentially dangerous situations in golang-jwt

- Severity: Low 3.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 49% of CVEs (2026-12-01)
- Published: 2024-11-04T21:47:12.170Z
- Modified: 2026-09-10T03:50:20.232Z
- Also known as: GHSA-29wx-vh33-7x7r, GO-2024-3250
- Related: CGA-c7xm-4mwh-v73x
- Weaknesses: CWE-347, CWE-755
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- golang-jwt jwt: < 4.5.1
- github.com/golang-jwt/jwt/v4 (Go): before 4.5.1

## Every score

- GitHub_M: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N`
- GitHub: CVSS:4.0 Low `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/golang-jwt/jwt/security/advisories/GHSA-29wx-vh33-7x7r> (advisory, web)
- <https://github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c> (fix, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-51744> (advisory)
- <https://github.com/golang-jwt/jwt> (package)

## Sources

- CVE List: [CVE-2024-51744](https://www.cve.org/CVERecord?id=CVE-2024-51744), CVE Terms of Use, modified 2024-11-05
- GitHub Advisory Database: [GHSA-29wx-vh33-7x7r](https://github.com/advisories/GHSA-29wx-vh33-7x7r), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2024-3250](https://pkg.go.dev/vuln/GO-2024-3250), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2024-51744](https://nvd.nist.gov/vuln/detail/CVE-2024-51744), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-51744 · Whole record: https://cve.day/CVE-2024-51744.json · Rebuilt by cve.day 2026-11-25T22:58:47.726Z
