Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/golang-jwt/jwt/v4
  4. ›
  5. CVE-2024-51744

CVE-2024-51744: Bad documentation of error handling in ParseWithClaims can lead to potentially dangerous situations

November 4, 2024 (updated November 12, 2024)

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.

References

  • github.com/advisories/GHSA-29wx-vh33-7x7r
  • github.com/golang-jwt/jwt
  • github.com/golang-jwt/jwt/commit/7b1c1c00a171c6c79bbdb40e4ce7d197060c1c2c
  • github.com/golang-jwt/jwt/security/advisories/GHSA-29wx-vh33-7x7r
  • nvd.nist.gov/vuln/detail/CVE-2024-51744

Code Behaviors & Features

Detect and mitigate CVE-2024-51744 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.1

Fixed versions

  • 4.5.1

Solution

Upgrade to version 4.5.1 or above.

Impact 3.1 LOW

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

Learn more about CVSS

Weakness

  • CWE-347: Improper Verification of Cryptographic Signature
  • CWE-755: Improper Handling of Exceptional Conditions

Source file

go/github.com/golang-jwt/jwt/v4/CVE-2024-51744.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:14 +0000.