CVE-2026-107724: fast-jwt treats raw public JWK JSON as an HMAC secret, enabling HS256 token forgery
fast-jwt 6.2.4 silently classifies raw serialized public JWK JSON
as an HMAC secret.
If an application supplies public JWK JSON text as the verifier key and
HS256 is explicitly allowed or automatically inferred, an attacker who
knows the same public JSON text can use it as an HMAC key and create an
arbitrary HS256 token that fast-jwt accepts as valid.
This can result in authentication or authorization bypass through forged JWT claims.
The PoC demonstrates the issue with a serialized RSA public JWK. The same non-PEM classification also applies to raw JWKS JSON text, although the attached standalone PoC focuses on the smallest JWK case.
References
- github.com/advisories/GHSA-g3jj-5cmm-3hxx
- github.com/nearform/fast-jwt/commit/10f9591349199ed2ab9fa1748ce92cdca697f6cf
- github.com/nearform/fast-jwt/pull/636
- github.com/nearform/fast-jwt/releases/tag/v6.3.0
- github.com/nearform/fast-jwt/security/advisories/GHSA-g3jj-5cmm-3hxx
- nvd.nist.gov/vuln/detail/CVE-2026-107724
Code Behaviors & Features
Detect and mitigate CVE-2026-107724 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →