# CVE-2024-54150: Algorithm Confusion Vulnerability in cjwt

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 34% of CVEs (2026-12-01)
- Published: 2024-12-19T18:22:33.901Z
- Modified: 2026-06-17T08:09:51.783Z
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

cjwt is a C JSON Web Token (JWT) Implementation. Algorithm confusion occurs when a system improperly verifies the type of signature used, allowing attackers to exploit the lack of distinction between signing methods.  If the system doesn't differentiate between an HMAC signed token and an RS/EC/PS signed token during verification, it becomes vulnerable to this kind of attack. For instance, an attacker could craft a token with the alg field set to "HS256" while the server expects an asymmetric algorithm like "RS256". The server might mistakenly use the wrong verification method, such as using a public key as the HMAC secret, leading to unauthorised access. For RSA, the key can be computed from a few signatures. For Elliptic Curve (EC), two potential keys can be recovered from one signature. This can be used to bypass the signature mechanism if an application relies on asymmetrically signed tokens. This issue has been addressed in version 2.3.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

(As written by CVE List.)

## Affected

- xmidt-org cjwt: < 2.3.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- CISA-ADP: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/xmidt-org/cjwt/security/advisories/GHSA-9h24-7qp5-gp82>
- <https://github.com/xmidt-org/cjwt/commit/096ab3e37f73c914b716e7259589179f363265fd>

## Sources

- CVE List: [CVE-2024-54150](https://www.cve.org/CVERecord?id=CVE-2024-54150), CVE Terms of Use, modified 2024-12-20
- NVD: [CVE-2024-54150](https://nvd.nist.gov/vuln/detail/CVE-2024-54150), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-54150 · Whole record: https://cve.day/CVE-2024-54150.json · Rebuilt by cve.day 2026-11-25T22:58:50.271Z
