CVE-2024-54150

9.1 CRITICAL

📋 TL;DR

CVE-2024-54150 is an algorithm confusion vulnerability in cjwt, a C JSON Web Token implementation. Attackers can forge JWT signatures by exploiting improper algorithm verification, potentially gaining unauthorized access to systems using vulnerable versions. All applications using cjwt versions before 2.3.0 are affected.

💻 Affected Systems

Products:
  • cjwt (C JSON Web Token Implementation)
Versions: All versions before 2.3.0
Operating Systems: All platforms where cjwt is used
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using cjwt for JWT verification without explicit algorithm validation is vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authentication bypass allowing attackers to impersonate any user, access sensitive data, and perform privileged operations.

🟠

Likely Case

Authentication bypass leading to unauthorized access to protected resources and potential data exposure.

🟢

If Mitigated

No impact if proper algorithm verification is enforced or patched version is used.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires understanding of JWT algorithm confusion attacks and ability to craft malicious tokens.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.3.0

Vendor Advisory: https://github.com/xmidt-org/cjwt/security/advisories/GHSA-9h24-7qp5-gp82

Restart Required: Yes

Instructions:

1. Identify all systems using cjwt
2. Update cjwt to version 2.3.0 or later
3. Rebuild and redeploy affected applications
4. Restart services using the updated library

🧯 If You Can't Patch

  • Implement strict algorithm validation in application code to reject tokens with unexpected algorithms
  • Use application-level signature verification that explicitly checks algorithm type before processing

🔍 How to Verify

Check if Vulnerable:

Check if application uses cjwt library version < 2.3.0 by examining dependencies or running: ldd on binary and checking linked libraries

Check Version:

Check build configuration or dependency files for cjwt version reference

Verify Fix Applied:

Verify cjwt version is 2.3.0 or higher and test JWT verification with various algorithm types to ensure proper validation

📡 Detection & Monitoring

Log Indicators:

  • Failed JWT verification attempts with algorithm mismatch errors
  • Unusual authentication patterns or token reuse

Network Indicators:

  • JWT tokens with algorithm field set to HS256 when RS256/ES256 expected
  • Authentication requests with modified JWT headers

SIEM Query:

source="application_logs" AND ("JWT validation failed" OR "algorithm mismatch" OR "signature verification failed")

🔗 References

📤 Share & Export