CVE-2024-51744
Low · 3.1CVSS
3.1
EPSS
0.5%
Published
Nov 4, 2024
CISA due date
—
Cloudanix analysis
A flaw in token-checking code can let attackers slip through with bad login tokens that should have been rejected.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- High
- Impact
- Data Exposure
- Component
- Library
- Class
- Authentication Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- High
What it actually does
ParseWithClaims returns combined errors for tokens that are both expired and signature-invalid; code that only inspects jwt.ErrTokenExpired via error.Is therefore ignores the embedded signature error and accepts invalid tokens.
Why it matters to the business
Attackers can bypass authentication controls in any application that relies on this library for token validation, potentially gaining unauthorized access to protected resources or user accounts.
How an attack unfolds
An attacker generates a JWT whose signature does not validate yet also carries an expired claim, submits it to an endpoint that calls ParseWithClaims, and succeeds when the application only checks error.Is(jwt.ErrTokenExpired) without also validating the signature error first.
How to fix it
Upgrade golang-jwt/jwt to release 4.5.1 (commit 7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c) or later; if immediate upgrade is impossible, rewrite all call sites to check dangerous errors such as ErrTokenSignatureInvalid before checking ErrTokenExpired.
How to confirm the fix worked
After upgrade, run unit tests that submit both valid-signature/expired tokens and invalid-signature tokens and confirm only the former produce a non-nil token; scan source for direct calls to ParseWithClaims and ensure error handling inspects all returned error values.
Typical attack path
- Locate services that import golang-jwt/jwt and call ParseWithClaims
- Craft a token containing an expired 'exp' claim but an invalid signature
- Send the token in the expected authentication header or parameter
- Bypass validation if the calling code only inspects the expired error
How to detect it
Search application logs and source repositories for calls to ParseWithClaims that test only ErrTokenExpired; review authentication success events that coincide with tokens containing invalid signatures or mismatched claims.
What your security team should do
- Prioritize upgrade of golang-jwt/jwt to 4.5.1 across all repositories and rebuild affected binaries
- Add static-analysis or lint rules that flag use of ParseWithClaims without exhaustive error checks
- Review authentication middleware for similar partial error handling patterns
- Monitor dependency update pipelines for the corrected release and enforce its adoption
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/golang-jwt/jwt/v4 | 0 | 4.5.1 |
| Chainguard | aactl | 0 | 0.4.12-r19 |
| Chainguard | actions-runner-controller | 0 | 0.9.3-r3 |
| Chainguard | actions-runner-controller-compat | 0 | 0.9.3-r3 |
| Chainguard | actions-runner-controller-fips | 0 | 0.9.3-r3 |
| Chainguard | actions-runner-controller-fips-compat | 0 | 0.9.3-r3 |
| Chainguard | argo-cd-2.10 | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-2.10-compat | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-2.10-repo-server | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-2.11 | 0 | 2.11.13-r6 |
| Chainguard | argo-cd-2.11-compat | 0 | 2.11.13-r6 |
| Chainguard | argo-cd-2.11-repo-server | 0 | 2.11.13-r6 |
| Chainguard | argo-cd-fips-2.10 | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-fips-2.10-compat | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-fips-2.10-repo-server | 0 | 2.10.18-r1 |
| Chainguard | argo-cd-fips-2.11 | 0 | 2.11.13-r5 |
| Chainguard | argo-cd-fips-2.11-compat | 0 | 2.11.13-r5 |
| Chainguard | argo-cd-fips-2.11-repo-server | 0 | 2.11.13-r5 |
| Chainguard | argo-cd-fips-2.12 | 0 | 2.12.10-r7 |
| Chainguard | argo-cd-fips-2.12-compat | 0 | 2.12.10-r7 |
| Chainguard | argo-cd-fips-2.12-repo-server | 0 | 2.12.10-r7 |
| Chainguard | argo-events | 0 | 1.9.2-r2 |
| Chainguard | argo-events-compat | 0 | 1.9.2-r2 |
| Chainguard | argo-events-fips | 0 | 1.9.2-r2 |
| Chainguard | argo-events-fips-compat | 0 | 1.9.2-r2 |
| Chainguard | argo-rollouts | 0 | 1.7.2-r1 |
| Chainguard | argo-rollouts-compat | 0 | 1.7.2-r1 |
| Chainguard | argo-rollouts-fips | 0 | 1.7.2-r1 |
| Chainguard | argo-workflow-cli | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-cli-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-controller | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-controller-compat | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-controller-compat-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-controller-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-executor | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-executor-compat | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-executor-compat-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflow-executor-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflows | 0 | 3.5.12-r1 |
| Chainguard | argo-workflows-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflows-known-hosts | 0 | 3.5.12-r1 |
| Chainguard | argo-workflows-known-hosts-fips | 0 | 3.5.12-r1 |
| Chainguard | argo-workflows-ui | 0 | 3.5.12-r1 |
| Chainguard | atlantis | 0 | 0.30.0-r1 |
| Chainguard | atlantis-fips | 0 | 0.30.0-r1 |
| Chainguard | azcopy | 0 | 10.27.0-r1 |
| Chainguard | azcopy-fips | 0 | 10.27.0-r1 |
| Chainguard | azure-aad-pod-identity-mic | 0 | 1.8.17-r13 |
| Chainguard | azure-aad-pod-identity-nmi | 0 | 1.8.17-r13 |
| Chainguard | azuredisk-csi-1.28 | 0 | 1.28.11-r3 |
| Chainguard | azuredisk-csi-1.28-compat | 0 | 1.28.11-r3 |
| Chainguard | azuredisk-csi-1.29 | 0 | 1.29.10-r3 |
| Chainguard | azuredisk-csi-1.29-compat | 0 | 1.29.10-r3 |
| Chainguard | azuredisk-csi-1.30 | 0 | 1.30.5-r3 |
| Chainguard | azuredisk-csi-1.30-compat | 0 | 1.30.5-r3 |
| Chainguard | azuredisk-csi-1.31 | 0 | 1.31.0-r3 |
| Chainguard | azuredisk-csi-1.31-compat | 0 | 1.31.0-r3 |
| Chainguard | azuredisk-csi-fips-1.28 | 0 | 1.28.11-r2 |
| Chainguard | azuredisk-csi-fips-1.29 | 0 | 1.29.10-r2 |
| Chainguard | azuredisk-csi-fips-1.30 | 0 | 1.30.5-r2 |
| Chainguard | azuredisk-csi-fips-1.31 | 0 | 1.31.0-r2 |
| Chainguard | bank-vaults | 0 | 1.20.4-r20 |
| Chainguard | bank-vaults-fips | 0 | 1.20.4-r16 |
| Chainguard | bank-vaults-template | 0 | 1.20.4-r20 |
| Chainguard | bank-vaults-template-fips | 0 | 1.20.4-r16 |
| Chainguard | boring-registry | 0 | 0.15.4-r1 |
| Chainguard | boring-registry-fips | 0 | 0.15.4-r1 |
| Chainguard | buildctl | 0 | 0.17.0-r1 |
| Chainguard | buildctl-fips | 0 | 0.17.0-r1 |
| Chainguard | buildkitd | 0 | 0.17.0-r1 |
| Chainguard | buildkitd-fips | 0 | 0.17.0-r1 |
| Chainguard | cert-manager-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-1.12-acmesolver | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-1.12-cainjector | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-1.12-controller | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-1.12-webhook | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-acmesolver-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-acmesolver-1.12-bitnami-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-acmesolver-1.12-iamguarded-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-acmesolver-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-cainjector-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-cainjector-1.12-bitnami-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-cainjector-1.12-iamguarded-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-cainjector-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-controller-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-controller-1.12-bitnami-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-controller-1.12-iamguarded-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-controller-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12-acmesolver | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12-cainjector | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12-cmctl | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12-controller | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-fips-1.12-webhook | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-webhook-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-webhook-1.12-bitnami-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-webhook-1.12-iamguarded-compat | 0 | 1.12.14-r0 |
| Chainguard | cert-manager-webhook-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | chainctl | 0 | 0.2.59-r0 |
| Chainguard | chartmuseum | 0 | 0.16.2-r7 |
| Chainguard | chartmuseum-fips | 0 | 0.16.2-r5 |
| Chainguard | cluster-autoscaler-1.28 | 0 | 1.28.6-r3 |
| Chainguard | cluster-autoscaler-1.28-compat | 0 | 1.28.6-r3 |
| Chainguard | cluster-autoscaler-1.29 | 0 | 1.29.4-r2 |
| Chainguard | cluster-autoscaler-1.29-compat | 0 | 1.29.4-r2 |
| Chainguard | cluster-autoscaler-1.30 | 0 | 1.30.2-r4 |
| Chainguard | cluster-autoscaler-1.30-compat | 0 | 1.30.2-r4 |
| Chainguard | cluster-autoscaler-1.31 | 0 | 1.31.0-r2 |
| Chainguard | cluster-autoscaler-1.31-compat | 0 | 1.31.0-r2 |
| Chainguard | cluster-autoscaler-1.32 | 0 | 1.32.0-r1 |
| Chainguard | cluster-autoscaler-1.32-compat | 0 | 1.32.0-r1 |
| Chainguard | cluster-autoscaler-fips-1.28 | 0 | 1.28.6-r3 |
| Chainguard | cluster-autoscaler-fips-1.28-compat | 0 | 1.28.6-r3 |
| Chainguard | cluster-autoscaler-fips-1.29 | 0 | 1.29.4-r2 |
| Chainguard | cluster-autoscaler-fips-1.29-compat | 0 | 1.29.4-r2 |
| Chainguard | cluster-autoscaler-fips-1.30 | 0 | 1.30.2-r3 |
| Chainguard | cluster-autoscaler-fips-1.30-compat | 0 | 1.30.2-r3 |
| Chainguard | cluster-autoscaler-fips-1.31 | 0 | 1.31.0-r2 |
| Chainguard | cluster-autoscaler-fips-1.31-compat | 0 | 1.31.0-r2 |
| Chainguard | cluster-autoscaler-fips-1.32 | 0 | 1.32.0-r1 |
| Chainguard | cluster-autoscaler-fips-1.32-compat | 0 | 1.32.0-r1 |
| Chainguard | cmctl-1.12 | 0 | 1.12.14-r0 |
| Chainguard | cmctl-1.12-fips | 0 | 1.12.14-r0 |
| Chainguard | cmctl-fips-1.12 | 0 | 1.12.14-r0 |
| Chainguard | consul-1.17 | 0 | 1.17.4-r11 |
| Chainguard | consul-1.17-oci-entrypoint | 0 | 1.17.4-r11 |
| Chainguard | consul-1.17-oci-entrypoint-compat | 0 | 1.17.4-r11 |
| Chainguard | consul-1.18 | 0 | 1.18.2-r3 |
| Chainguard | consul-1.18-oci-entrypoint | 0 | 1.18.2-r3 |
| Chainguard | consul-1.18-oci-entrypoint-compat | 0 | 1.18.2-r3 |
| Chainguard | consul-1.19 | 0 | 1.19.2-r2 |
| Chainguard | consul-1.19-oci-entrypoint | 0 | 1.19.2-r2 |
| Chainguard | consul-1.19-oci-entrypoint-compat | 0 | 1.19.2-r2 |
| Chainguard | consul-1.20 | 0 | 1.20.1-r1 |
| Chainguard | consul-1.20-oci-entrypoint | 0 | 1.20.1-r1 |
| Chainguard | consul-1.20-oci-entrypoint-compat | 0 | 1.20.1-r1 |
| Chainguard | consul-fips-1.17 | 0 | 1.17.4-r3 |
| Chainguard | consul-fips-1.17-oci-entrypoint | 0 | 1.17.4-r3 |
| Chainguard | consul-fips-1.17-oci-entrypoint-compat | 0 | 1.17.4-r3 |
| Chainguard | consul-fips-1.18 | 0 | 1.18.2-r1 |
| Chainguard | consul-fips-1.18-oci-entrypoint | 0 | 1.18.2-r1 |
| Chainguard | consul-fips-1.18-oci-entrypoint-compat | 0 | 1.18.2-r1 |
| Chainguard | consul-fips-1.19 | 0 | 1.19.2-r2 |
| Chainguard | consul-fips-1.19-oci-entrypoint | 0 | 1.19.2-r2 |
| Chainguard | consul-fips-1.19-oci-entrypoint-compat | 0 | 1.19.2-r2 |
| Chainguard | consul-fips-1.20 | 0 | 1.20.1-r1 |
| Chainguard | consul-fips-1.20-oci-entrypoint | 0 | 1.20.1-r1 |
| Chainguard | consul-fips-1.20-oci-entrypoint-compat | 0 | 1.20.1-r1 |
| Chainguard | coredns | 0 | 1.11.3-r8 |
| Chainguard | coredns-compat | 0 | 1.11.3-r8 |
| Chainguard | coredns-fips | 0 | 1.11.3-r6 |
| Chainguard | cosign | 0 | 2.4.1-r1 |
| Chainguard | cosign-fips | 0 | 2.4.1-r1 |
| Chainguard | crossplane | 0 | 1.18.0-r0 |
| Chainguard | crossplane-crank | 0 | 1.18.0-r0 |
| Chainguard | crossplane-crank-fips | 0 | 1.18.0-r0 |
| Chainguard | crossplane-fips | 0 | 1.18.0-r0 |
| Chainguard | crossplane-provider-azure | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-authorization | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-authorization-compat | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-family | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-managedidentity | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-managedidentity-compat | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-sql | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-sql-compat | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-storage | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-azure-storage-compat | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-family-azure | 0 | 1.11.2-r0 |
| Chainguard | crossplane-provider-family-azure-compat | 0 | 1.11.2-r0 |
| Chainguard | crossplane-xfn | 0 | 1.18.0-r0 |
| Chainguard | docker | 0 | 27.3.1-r3 |
| Chainguard | docker-config-mirror-gcr | 0 | 27.3.1-r3 |
| Chainguard | docker-credential-cgr | 0 | 0.2.59-r0 |
| Chainguard | docker-dind | 0 | 27.3.1-r3 |
| Chainguard | docker-dind-compat | 0 | 27.3.1-r3 |
| Chainguard | docker-init | 0 | 27.3.1-r3 |
| Chainguard | docker-modprobe-compat | 0 | 27.3.1-r3 |
| Chainguard | docker-oci-entrypoint | 0 | 27.3.1-r3 |
| Chainguard | docker-rootless | 0 | 27.3.1-r3 |
| Chainguard | dockerd | 0 | 27.3.1-r3 |
| Chainguard | dockerd-oci-entrypoint | 0 | 27.3.1-r3 |
| Chainguard | dockerd-service | 0 | 27.3.1-r3 |
| Chainguard | doppler-kubernetes-operator | 0 | 1.5.1-r5 |
| Chainguard | eks-distro-1.27 | 0 | 1.27.40-r3 |
| Chainguard | eks-distro-1.28 | 0 | 1.28.35-r1 |
| Chainguard | eks-distro-1.28 | 0 | 1.28.49-r1 |
| Chainguard | eks-distro-1.29 | 0 | 1.29.24-r1 |
| Chainguard | eks-distro-1.29 | 0 | 1.29.38-r1 |
| Chainguard | eks-distro-1.30 | 0 | 1.30.17-r1 |
| Chainguard | eks-distro-1.31 | 0 | 1.31.6-r1 |
| Chainguard | eks-distro-coredns-1.27 | 0 | 1.27.40-r3 |
| Chainguard | eks-distro-coredns-1.28 | 0 | 1.28.35-r1 |
| Chainguard | eks-distro-coredns-1.28 | 0 | 1.28.49-r1 |
| Chainguard | eks-distro-coredns-1.29 | 0 | 1.29.24-r1 |
| Chainguard | eks-distro-coredns-1.29 | 0 | 1.29.38-r1 |
| Chainguard | eks-distro-coredns-1.30 | 0 | 1.30.17-r1 |
| Chainguard | eks-distro-coredns-1.31 | 0 | 1.31.6-r1 |
| Chainguard | eks-distro-coredns-fips-1.27 | 0 | 1.27.40-r1 |
| Chainguard | eks-distro-coredns-fips-1.28 | 0 | 1.28.49-r1 |
| Chainguard | eks-distro-coredns-fips-1.29 | 0 | 1.29.24-r1 |
Related vulnerabilities
- CVE-2026-33186 gRPC-Go is the Go language implementation of gRPC. Also affects aactl
- CVE-2025-15558 Docker CLI for Windows searches for plugin binaries in C:\ProgramData\Docker\cli-plugins… Also affects aactl
- CVE-2026-1229 The CombinedMult function in the CIRCL ecc/p384 package (secp384r1 curve) produces an… Also affects aactl
- CVE-2026-26958 filippo.io/edwards25519 is a Go library implementing the edwards25519 elliptic curve with… Also affects aactl
- CVE-2025-68121 During session resumption in crypto/tls, if the underlying Config has its ClientCAs or… Also affects aactl
- CVE-2025-61732 A discrepancy between how Go and C/C++ comments were parsed allowed for code smuggling… Also affects aactl
- CVE-2025-68119 Downloading and building modules with malicious version strings can cause local code… Also affects aactl
- CVE-2025-61731 Building a malicious file with cmd/go can cause can cause a write to an… Also affects aactl