Bad documentation of error handling in ParseWithClaims can lead to potentially dangerous situations in golang-jwt
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Partial Red Hat: 5 fixed, 36 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-347.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| golang-jwt | jwt | before 4.5.1 | 4.5.1 | Patch available | CNA |
| — | github.com/golang-jwt/jwt/v4 (Go) | before 4.5.1 | 4.5.1 | Patch available | GHSA-29wx-vh33-7x7r |
- jwt Vendorgolang-jwt Affected before 4.5.1 Fixed in 4.5.1 Patch available CNA
- github.com/golang-jwt/jwt/v4 (Go) Vendor— Affected before 4.5.1 Fixed in 4.5.1 Patch available GHSA-29wx-vh33-7x7r
Remediation
- Fix · CNA jwt (golang-jwt) Fixed in 4.5.1
- Fix · GHSA-29wx-vh33-7x7r github.com/golang-jwt/jwt/v4 (Go) Fixed in 4.5.1 Advisory →
Red Hat 5 advisories
- RHSA-2026:3406 Released 2026-02-26 · Red Hat rating ImportantNew container image: rhceph-9.0
- Red Hat Ceph Storage 9 registry.redhat.io/rhceph/grafana-rhel10, registry.redhat.io/rhceph/rhceph-9-rhel9
- RHSA-2026:2769 Released 2026-02-17 · Red Hat rating ImportantRed Hat Ceph Storage 7.1 security and bug fix updates
- Red Hat Ceph Storage 7.1 Tools ceph-2:18.2.1-381.el8cp, ceph-2:18.2.1-381.el9cp, ceph-base-2:18.2.1-381.el8cp +47
- RHSA-2026:2737 Released 2026-02-16 · Red Hat rating ImportantRed Hat Ceph Storage
- Red Hat Ceph Storage 8 registry.redhat.io/rhceph/grafana-rhel9, registry.redhat.io/rhceph/rhceph-8-rhel9
Show 2 more Red Hat advisories
- RHSA-2025:11681 Released 2025-07-30 · Red Hat rating ImportantOpenShift Container Platform 4.16.45 bug fix and security update
- Red Hat OpenShift Container Platform 4.16 openshift4/aws-kms-encryption-provider-rhel9, openshift4/azure-kms-encryption-provider-rhel9, openshift4/cloud-network-config-controller-rhel9 +47
- RHSA-2025:11351 Released 2025-07-23 · Red Hat rating ImportantOpenShift Container Platform 4.15.55 bug fix and security update
- Red Hat OpenShift Container Platform 4.15 openshift4/ose-nutanix-machine-controllers-rhel9, openshift4/ose-powervs-machine-controllers-rhel9
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Builds for Red Hat OpenShift | Affected | No fix yet: Fix deferred |
| Cryostat 3 | Affected | No fix yet: Fix deferred |
| Custom Metric Autoscaler operator for Red Hat Openshift | Affected | No fix yet: Fix deferred |
| Logging Subsystem for Red Hat OpenShift | Affected | No fix yet: Fix deferred |
| Logical Volume Manager Storage | Affected | No fix yet: Fix deferred |
| Migration Toolkit for Applications 7 | Affected | No fix yet: Fix deferred |
| Migration Toolkit for Containers | Affected | No fix yet: Fix deferred |
| Multicluster Engine for Kubernetes | Affected | No fix yet: Fix deferred |
| OpenShift API for Data Protection | Affected | No fix yet: Fix deferred |
| OpenShift Developer Tools and Services | Affected | No fix yet: Fix deferred |
| OpenShift Pipelines | Affected | No fix yet: Fix deferred |
| OpenShift Serverless | Affected | No fix yet: Fix deferred |
| OpenShift Service Mesh 2 | Affected | No fix yet: Fix deferred |
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix yet: Fix deferred |
| Red Hat Advanced Cluster Security 4 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Ceph Storage 5 | Affected | No fix yet: Fix deferred |
| Red Hat Ceph Storage 6 | Affected | No fix yet |
| Red Hat Ceph Storage 8 | Affected | No fix yet |
| Red Hat Ceph Storage 9 | Affected | No fix yet |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Cluster Manager CLI | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Data Science (RHODS) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift GitOps | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Virtualization 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift on AWS | Affected | No fix yet: Fix deferred |
| Red Hat Openshift Data Foundation 4 | Affected | No fix yet: Fix deferred |
| Red Hat Openshift Sandboxed Containers | Affected | No fix yet: Fix deferred |
| Red Hat Quay 3 | Affected | No fix yet: Fix deferred |
| Red Hat Trusted Artifact Signer | Affected | No fix yet: Fix deferred |
| cert-manager Operator for Red Hat OpenShift | Affected | No fix yet: Fix deferred |
| Red Hat Ceph Storage 7.1 Tools | Fixed | RHSA-2026:2769 |
| Red Hat Ceph Storage 8 | Fixed | RHSA-2026:2737 |
| Red Hat Ceph Storage 9 | Fixed | RHSA-2026:3406 |
| Red Hat OpenShift Container Platform 4.15 | Fixed | RHSA-2025:11351 |
| Red Hat OpenShift Container Platform 4.16 | Fixed | RHSA-2025:11681 |
Not affected: 3 products
- Red Hat Ceph Storage 8
- Red Hat Ceph Storage 9
- Red Hat OpenShift Container Platform 4.15
Timeline
- 2026-10-02 Threatist record created from CVE-2024-51744
- 2026-10-03 Alias added: GHSA-29wx-vh33-7x7r
References
More golang-jwt vulnerabilities
- TI-2025-21540 jwt-go allows excessive memory allocation during header parsing CVSS 3.1HIGH 7.5
Sources
- CVE-2024-51744 · CVE Program
- CVE-2024-51744 · NVD
- FIRST EPSS
- GHSA-29wx-vh33-7x7r · GitHub Advisory Database · CC BY 4.0
- CVE-2024-51744 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences