CVE-2024-51744 Bad documentation of error handling in ParseWithClaims can lead to potentially dangerous situations in golang-jwt
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- KubernetesUbuntuDebian
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.
Upgrade path
47 packages: 36 fixed, 10 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| cbl-mariner blobfuse2(CBL-Mariner 2.0) | All versions | No fix listed | No fix yet |
| cbl-mariner terraform(CBL-Mariner 2.0) | All versions | No fix listed | No fix yet |
| debian/golang-github-golang-jwt-jwt(Debian 12) | = 4.4.3-1; = 5.0.0+really4.5.0-1; = 5.0.0+really4.5.0-1~exp1; = 5.0.0+really4.5.0-2 +3 more | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| azure linux application-gateway-kubernetes-ingress(Azure Linux 3.0) | < 1.7.7-1 | 1.7.7-1 | Fixed |
| azure linux azcopy(Azure Linux 3.0) | < 10.25.1-4 | 10.25.1-4 | Fixed |
| azure linux cert-manager(Azure Linux 3.0) | < 1.12.15-1 | 1.12.15-1 | Fixed |
| azure linux coredns(Azure Linux 3.0) | < 1.11.4-1 | 1.11.4-1 | Fixed |
| azure linux dcos-cli(Azure Linux 3.0) | < 1.2.0-18 | 1.2.0-18 | Fixed |
| azure linux etcd(Azure Linux 3.0) | < 3.5.18-1 | 3.5.18-1 | Fixed |
| azure linux flannel(Azure Linux 3.0) | < 0.24.2-13 | 0.24.2-13 | Fixed |
| azure linux influxdb(Azure Linux 3.0) | < 2.7.5-3 | 2.7.5-3 | Fixed |
| azure linux jx(Azure Linux 3.0) | < 3.10.182-1 | 3.10.182-1 | Fixed |
| azure linux keda(Azure Linux 3.0) | < 2.14.1-6 | 2.14.1-6 | Fixed |
| azure linux moby-engine(Azure Linux 3.0) | < 25.0.3-13 | 25.0.3-13 | Fixed |
| azure linux packer(Azure Linux 3.0) | < 1.9.5-8 | 1.9.5-8 | Fixed |
| azure linux prometheus(Azure Linux 3.0) | < 2.45.4-12 | 2.45.4-12 | Fixed |
| azure linux telegraf(Azure Linux 3.0) | < 1.31.0-6 | 1.31.0-6 | Fixed |
| cbl-mariner application-gateway-kubernetes-ingress(CBL-Mariner 2.0) | < 1.4.0-25 | 1.4.0-25 | Fixed |
| cbl-mariner azcopy(CBL-Mariner 2.0) | < 10.25.1-4 | 10.25.1-4 | Fixed |
| cbl-mariner cert-manager(CBL-Mariner 2.0) | < 1.11.2-22 | 1.11.2-22 | Fixed |
| cbl-mariner cf-cli(CBL-Mariner 2.0) | < 8.4.0-24 | 8.4.0-24 | Fixed |
| cbl-mariner coredns(CBL-Mariner 2.0) | < 1.11.1-18 | 1.11.1-18 | Fixed |
| cbl-mariner dcos-cli(CBL-Mariner 2.0) | < 1.2.0-21 | 1.2.0-21 | Fixed |
… and 17 more packages.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| golang-jwt github.com/golang-jwt/jwt/v4(Go) | < 4.5.1 | 4.5.1 |
| cbl-mariner telegraf(CBL-Mariner:2.0) | < 1.29.4-14 | 1.29.4-14 |
| cbl-mariner kubevirt(CBL-Mariner:2.0) | < 0.59.0-27 | 0.59.0-27 |
| cbl-mariner azcopy(CBL-Mariner:2.0) | < 10.25.1-4 | 10.25.1-4 |
| cbl-mariner application-gateway-kubernetes-ingress(CBL-Mariner:2.0) | < 1.4.0-25 | 1.4.0-25 |
| cbl-mariner etcd(CBL-Mariner:2.0) | < 3.5.21-1 | 3.5.21-1 |
| cbl-mariner packer(CBL-Mariner:2.0) | < 1.9.5-11 | 1.9.5-11 |
| azure linux etcd(Azure Linux:3.0) | < 3.5.18-1 | 3.5.18-1 |
| azure linux jx(Azure Linux:3.0) | < 3.10.182-1 | 3.10.182-1 |
| azure linux prometheus(Azure Linux:3.0) | < 2.45.4-12 | 2.45.4-12 |
| azure linux telegraf(Azure Linux:3.0) | < 1.31.0-6 | 1.31.0-6 |
| Kubernetes(Azure Linux:3.0) | < 1.30.10-5 | 1.30.10-5 |
| azure linux keda(Azure Linux:3.0) | < 2.14.1-6 | 2.14.1-6 |
| azure linux dcos-cli(Azure Linux:3.0) | < 1.2.0-18 | 1.2.0-18 |
| azure linux application-gateway-kubernetes-ingress(Azure Linux:3.0) | < 1.7.7-1 | 1.7.7-1 |
| azure linux influxdb(Azure Linux:3.0) | < 2.7.5-3 | 2.7.5-3 |
| azure linux packer(Azure Linux:3.0) | < 1.9.5-8 | 1.9.5-8 |
| azure linux flannel(Azure Linux:3.0) | < 0.24.2-13 | 0.24.2-13 |
| azure linux cert-manager(Azure Linux:3.0) | < 1.12.15-1 | 1.12.15-1 |
| azure linux azcopy(Azure Linux:3.0) | < 10.25.1-4 | 10.25.1-4 |
| azure linux coredns(Azure Linux:3.0) | < 1.11.4-1 | 1.11.4-1 |
| azure linux moby-engine(Azure Linux:3.0) | < 25.0.3-13 | 25.0.3-13 |
| cbl-mariner moby-engine(CBL-Mariner:2.0) | < 24.0.9-17 | 24.0.9-17 |
| cbl-mariner influxdb(CBL-Mariner:2.0) | < 2.6.1-22 | 2.6.1-22 |
| cbl-mariner kube-vip-cloud-provider(CBL-Mariner:2.0) | < 0.0.2-22 | 0.0.2-22 |
Show 28 more
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner coredns(CBL-Mariner:2.0) | < 1.11.1-18 | 1.11.1-18 |
| cbl-mariner keda(CBL-Mariner:2.0) | < 2.4.0-29 | 2.4.0-29 |
| cbl-mariner terraform(CBL-Mariner:2.0) | All versions | No fix listed |
| Kubernetes(CBL-Mariner:2.0) | < 1.28.4-17 | 1.28.4-17 |
| cbl-mariner rook(CBL-Mariner:2.0) | < 1.6.2-26 | 1.6.2-26 |
| cbl-mariner cf-cli(CBL-Mariner:2.0) | < 8.4.0-24 | 8.4.0-24 |
| cbl-mariner cert-manager(CBL-Mariner:2.0) | < 1.11.2-22 | 1.11.2-22 |
| cbl-mariner dcos-cli(CBL-Mariner:2.0) | < 1.2.0-21 | 1.2.0-21 |
| cbl-mariner prometheus(CBL-Mariner:2.0) | < 2.37.9-4 | 2.37.9-4 |
| cbl-mariner blobfuse2(CBL-Mariner:2.0) | All versions | No fix listed |
| cbl-mariner jx(CBL-Mariner:2.0) | < 3.2.236-21 | 3.2.236-21 |
| debian/golang-github-golang-jwt-jwt(Debian:12) | All versions | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 4.4.3-1 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 5.0.0+really4.5.0-1 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 5.0.0+really4.5.0-1~exp1 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 5.0.0+really4.5.0-2 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 5.0.0+really4.5.2-1 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:12) | = 5.0.0-1 | No fix listed |
| debian/golang-github-golang-jwt-jwt(Debian:13) | < 5.0.0+really4.5.2-1 | 5.0.0+really4.5.2-1 |
| debian/golang-github-golang-jwt-jwt(Debian:14) | < 5.0.0+really4.5.2-1 | 5.0.0+really4.5.2-1 |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu:22.04) | All versions | No fix listed |
| golang-jwt github.com/golang-jwt/jwt/v4 | = < 4.5.1 | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/golang-github-golang-jwt-jwt-v5(Ubuntu:26.10) | All versions | No fix listed |
References
- https://github.com/golang-jwt/jwt/security/advisories/GHSA-29wx-vh33-7x7r vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c patch
- github.com product
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- github.com
- Debian Security Tracker CVE-2024-51744 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking