# CVE-2026-107724: fast-jwt treats raw public JWK JSON as an HMAC secret, enabling HS256 token forgery

- Severity: High 7.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A: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.28%, higher than 22% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-08T21:53:01.909Z
- Modified: 2026-10-09T16:17:23.740Z
- Also known as: GHSA-g3jj-5cmm-3hxx
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.2.4, fast-jwt can classify raw serialized public JWK or JWKS JSON as an HMAC secret because src/crypto.js performDetectPublicKeyAlgorithms treats non-PEM strings as symmetric key material. If HS256 is explicitly allowed or inferred, an attacker who knows the exact serialized public-key bytes can use those bytes as an HMAC key and create a token containing arbitrary claims that createVerifier accepts. Serialization ordering or whitespace differences can prevent exploitation, and applications using supported PEM keys with an asymmetric-only algorithm allowlist are not affected. This issue is fixed in version 6.3.0.

(As written by CVE List.)

## Affected

- nearform fast-jwt: >= 6.2.4, < 6.3.0
- fast-jwt (npm): from 6.2.4 before 6.3.0

## Every score

- GitHub_M: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/nearform/fast-jwt/security/advisories/GHSA-g3jj-5cmm-3hxx> (exploit, web)
- <https://github.com/nearform/fast-jwt/pull/636> (web)
- <https://github.com/nearform/fast-jwt/commit/10f9591349199ed2ab9fa1748ce92cdca697f6cf> (web)
- <https://github.com/nearform/fast-jwt/releases/tag/v6.3.0> (web)
- <https://github.com/nearform/fast-jwt> (package)

## Sources

- CVE List: [CVE-2026-107724](https://www.cve.org/CVERecord?id=CVE-2026-107724), CVE Terms of Use, modified 2026-10-09
- GitHub Advisory Database: [GHSA-g3jj-5cmm-3hxx](https://github.com/advisories/GHSA-g3jj-5cmm-3hxx), CC-BY-4.0, modified 2026-10-08
- NVD: [CVE-2026-107724](https://nvd.nist.gov/vuln/detail/CVE-2026-107724), Public domain, modified 2026-10-09

---

Page: https://cve.day/CVE-2026-107724 · Whole record: https://cve.day/CVE-2026-107724.json · Rebuilt by cve.day 2026-11-25T22:59:43.243Z
