CVE-2024-51744

LowCVSS 3.1/10Last modified Jun 17, 2026

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.

Metrics

CVSS 3.1 3.1/10CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N

Weakness enumeration

Affected software

No affected versions have been published.

Timeline

Published
Nov 4, 2024
Last modified
Jun 17, 2026
NVD status
Deferred

Related CVEs from 2024

CVE-2024-5174510.0Wasmtime is a fast and secure runtime for WebAssembly. Wasmtime's filesystem sandbox implementation on Windows blocks access to special deviCVE-2024-517461.8Gitsign is a keyless Sigstore to signing tool for Git commits with your a GitHub / OIDC identity. gitsign may select the wrong Rekor entry tCVE-2024-517477.2Kanboard is project management software that focuses on the Kanban methodology. An authenticated Kanboard admin can read and delete arbitrarCVE-2024-517487.2Kanboard is project management software that focuses on the Kanban methodology. An authenticated Kanboard admin can run arbitrary php code oCVE-2024-517493.5Element is a Matrix web client built using the Matrix React SDK. Versions of Element Web and Desktop earlier than 1.11.85 do not check if thCVE-2024-517505.0Element is a Matrix web client built using the Matrix React SDK. A malicious homeserver can send invalid messages over federation which can CVE-2024-517516.5Gradio is an open-source Python package designed to enable quick builds of a demo or web application. If File or UploadButton components areCVE-2024-517525.5The AuthKit library for Next.js provides convenient helpers for authentication and session management using WorkOS & AuthKit with Next.js. ICVE-2024-517532.1The AuthKit library for Remix provides convenient helpers for authentication and session management using WorkOS & AuthKit with Remix. In afCVE-2024-517542.2Twig is a template language for PHP. In a sandbox, an attacker can call `__toString()` on an object even if the `__toString()` method is notCVE-2024-517552.2Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the sCVE-2024-517562.3The cap-std project is organized around the eponymous `cap-std` crate, and develops libraries to make it easy to write capability-based code
CVE-2024-51744: Low severity, CVSS 3.1 | Vulnix