PT-2024-34877 · Unknown+3 · Golang-Jwt+3

Yuligesec

·

Published

2024-11-04

·

Updated

2026-01-24

·

CVE-2024-51744

CVSS v3.1

3.1

Low

VectorAV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions golang-jwt versions prior to 4.5.1
Description The issue arises from unclear documentation of the error behavior in ParseWithClaims, potentially leading to situations where users do not properly check errors. Specifically, if a token is both expired and invalid, the errors returned by ParseWithClaims include both error codes. If users only check for jwt.ErrTokenExpired using error.Is, they may ignore the embedded jwt.ErrTokenSignatureInvalid and thus potentially accept invalid tokens.
Recommendations For golang-jwt versions prior to 4.5.1, ensure that you are properly checking for all errors, with "dangerous" ones first, to avoid potentially accepting invalid tokens. Consider updating to version 4.5.1, which includes a fix for the error handling logic, but be aware that this update might break your code due to changes in the behavior of the established ParseWithClaims function. If updating to 4.5.1 is not feasible, manually verify the errors returned by ParseWithClaims, checking for jwt.ErrTokenSignatureInvalid and other critical errors before checking for less severe issues like jwt.ErrTokenExpired.

Exploit

Fix

Improper Verification of Cryptographic Signature

Improper Handling of Exceptional Conditions

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2025_16880
ALT-PU-2025-7475
AZL-52171
AZL-52174
AZL-52180
AZL-52183
AZL-52186
AZL-52189
AZL-52192
AZL-52195
AZL-52198
AZL-52201
AZL-52204
AZL-52207
AZL-52210
AZL-52213
AZL-52216
AZL-52219
AZL-52221
AZL-52224
AZL-52227
AZL-52230
AZL-52233
AZL-52236
AZL-52239
AZL-52242
AZL-52248
AZL-52251
AZL-52254
AZL-52257
AZL-52260
AZL-52265
AZL-52266
AZL-52272
AZL-52275
AZL-52278
CVE-2024-51744
ECHO-AB50-1F31-2940
GHSA-29WX-VH33-7X7R
GO-2024-3250
OPENSUSE-SU-2024:14481-1
OPENSUSE-SU-2024:14484-1
OPENSUSE-SU-2024:14495-1
OPENSUSE-SU-2024:14517-1
OPENSUSE-SU-2024:14522-1
OPENSUSE-SU-2024_4042-1
OPENSUSE-SU-2025:0131-1
OPENSUSE-SU-2025:14663-1
OPENSUSE-SU-2025:14768-1
OPENSUSE-SU-2025:14840-1
OPENSUSE-SU-2025:14988-1
OPENSUSE-SU-2025:20117-1
OPENSUSE-SU-2025_0525-1
OPENSUSE-SU-2025_0546-1
OPENSUSE-SU-2025_1333-1
OPENSUSE-SU-2026:20099-1
OPENSUSE-SU-2026:20620-1
OPENSUSE-SU-2026:20654-1
OPENSUSE-SU-2026:20798-1
RHSA-2026:2769
SUSE-SU-2024:4042-1
SUSE-SU-2025:01985-1
SUSE-SU-2025:0524-1
SUSE-SU-2025:0525-1
SUSE-SU-2025:0546-1
SUSE-SU-2025:1333-1
SUSE-SU-2025_1333-1

Affected Products

Alt Linux
Debian
Suse
Golang-Jwt