Skip to main content

fast-jwt EUVDEUVD-2026-95312

| CVE-2026-107724 HIGH
Improper Verification of Cryptographic Signature (CWE-347)
2026-10-08 GitHub_M GHSA-g3jj-5cmm-3hxx
7.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain victim's public JWK/JWKS JSON
  2. Delivery
    Reproduce exact serialized key bytes
  3. Exploit
    Use bytes as HMAC key to sign HS256 token
  4. Execution
    Forge arbitrary claims
  5. Persist
    Submit token to verifier
  6. Impact
    Authentication/authorization bypass

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
Exploitation Conditions

Exploitable only when the application passes a raw serialized public JWK or JWKS JSON string (not a PEM-encoded key or X.509 cert) as the verifier key to fast-jwt 6.2.4, AND HS256 (or another HS* algorithm) is explicitly in the allowlist or inferred via automatic detection. The attacker must reproduce the victim's exact serialized JSON bytes - differing property ordering or whitespace defeats the HMAC key match. Limiting factors: applications using PEM-format keys with an asymmetric-only (RS*/ES*/EdDSA) algorithm allowlist are not affected, and symmetric kty=oct JWKs are legitimately out of scope. No user interaction or authentication is required once the vulnerable configuration exists.

Impact

The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N, 7.4 High) accurately captures a network-reachable, unauthenticated signature-verification bypass (CWE-347) with high confidentiality and integrity impact but meaningful attack complexity. The AC:H rating is well justified: exploitation only works when the application feeds fast-jwt a raw serialized public JWK/JWKS JSON string as the verifier key AND HS256 is allowed/inferred, and the attacker's forged key bytes must byte-for-byte match the victim's serialization (ordering and whitespace), which the advisory explicitly notes can prevent exploitation. No EPSS score, KEV listing, or SSVC decision data was provided, so automatable/widespread-exploitation signals cannot be assessed - treat the absence of EPSS/KEV as missing data, not as evidence of low risk. A PoC is documented in the GHSA advisory (publicly available exploit code exists), which raises practical risk, but the required non-default key-handling pattern makes this a targeted/configuration-dependent issue rather than a broadly sprayable one. Net: a real priority for teams that pass JWK/JWKS JSON directly to fast-jwt with a symmetric algorithm in the allowlist; low real-world exposure for the common case of PEM keys with an asymmetric-only allowlist, who the advisory states are not affected.

Exploit ScenarioDerived

An application configures fast-jwt (<=6.2.4) to verify tokens using a raw serialized public JWK or JWKS JSON string as the key, with HS256 explicitly allowed or auto-inferred. Because the public JWK material is public by design, a remote unauthenticated attacker who reproduces the exact serialized JSON bytes uses them as an HMAC secret to sign a forged HS256 token with arbitrary claims, which createVerifier accepts - yielding authentication/authorization bypass. A proof-of-concept using a serialized RSA public JWK is published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

Signature-verification bypass in NearForm fast-jwt 6.2.4 lets a remote, unauthenticated attacker forge HS256-signed JWTs with arbitrary claims when the application supplies a raw serialized public JWK or JWKS JSON string as the verifier key and HS256 (or another HS* algorithm) is allowed or auto-inferred. Because JWK public material is public by design, those exact JSON bytes become the HMAC secret, so the attacker can mint tokens that createVerifier accepts - the affected configuration is narrow but the impact is a full authentication/authorization bypass. Exploitation requires the attacker to reproduce the victim's exact serialized bytes (property ordering and whitespace must match), and publicly available exploit code exists; CISA KEV does not list this CVE and EPSS data was not provided. Version 6.3.0 fixes the flaw. CWE-347 (Improper Verification of Cryptographic Signature).

RemediationAI

Vendor-released patch: upgrade fast-jwt to 6.3.0 (https://github.com/nearform/fast-jwt/releases/tag/v6.3.0), which adds the asymmetric JWK/JWKS detection and rejection introduced in PR #636 (https://github.com/nearform/fast-jwt/pull/636, commit https://github.com/nearform/fast-jwt/commit/10f9591349199ed2ab9fa1748ce92cdca697f6cf); see advisory GHSA-g3jj-5cmm-3hxx for the full write-up. If an immediate upgrade is not possible, the highest-value compensating control is to stop passing raw JWK/JWKS JSON text as the verifier key: supply the key in PEM format or as an X.509 certificate instead, which forces classification down the asymmetric path and eliminates the HMAC fallback - the trade-off is that key-loading code and any key-rotation pipeline must be reworked to emit PEM rather than JSON. A second, complementary control is to pin the algorithms option to an asymmetric-only allowlist (e.g. RS256/ES256/EdDSA) and remove HS* from both the allowlist and any automatic-inference path; this neutralizes the attack with no key-format changes but breaks any legitimate HS256 consumers of the same verifier. Note that fast-jwt's long-standing escape hatch - explicitly requesting HS256, which skips detection entirely and uses the string as-is - is unchanged by the patch for both detection functions, so do not treat an explicit HS256 request over JWK JSON as safe even after upgrading. Finally, because the attack depends on byte-exact reproduction of the serialized key, normalizing and re-emitting verifier keys from a controlled internal source (rather than echoing externally supplied JWKS JSON) reduces exposure; this is brittle as a sole mitigation since whitespace or property-ordering changes are attacker-side variables, not a real security boundary. Rotating any signing keys or secrets reachable through tokens that may already have been forged is advisable if the vulnerable configuration was in production.

Affected VersionsENISA

fast-jwt 6.2.4, < 6.3.0

Affected Packages

npm fast-jwt fix: 6.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

fast-jwt is a Node.js JWT library that accepts a string or Buffer as verifier key material. In 6.2.4, src/crypto.js performDetectPublicKeyAlgorithms() infers the permitted algorithm family from the supplied string: strings matching supported PEM public-key formats (or X.509 certificate headers) are treated as asymmetric keys, while any other non-empty string falls through to return hsAlgorithms and is assumed to be a raw HMAC secret. A serialized public JWK (RFC 7517) or JWKS document is valid JSON but carries no PEM header, so it hits that fallback and the complete JSON string is then used verbatim as the HMAC key on the HS256 verification path. This is the classic RSA/EC-to-HMAC key-confusion class of bug (CWE-347): public asymmetric key bytes are reinterpreted as a symmetric secret, and since public key material is not secret, an attacker who knows the exact serialized JSON can compute a valid HMAC over arbitrary claims. The upstream fix (PR #636) adds an isAsymmetricJwk() / isAsymmetricJwkJson() check keyed on the RFC 7518 / RFC 8037 kty values RSA, EC and OKP (deliberately excluding oct so legitimate symmetric JWKs keep working) and an assertNotAsymmetricJwkJson() guard invoked from both performDetectPublicKeyAlgorithms and performDetectPrivateKeyAlgorithm, throwing TokenError.codes.invalidKey with 'Raw asymmetric JWK/JWKS JSON cannot be used as an HMAC secret.' Test coverage in the patch handles compact and pretty-printed JWKs, JWKS wrappers, bare keys arrays, leading/trailing whitespace, rejection for RSA/EC/OKP, and continued acceptance of kty=oct arrays. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N (7.4 High) matches: network reachable, no privileges or user interaction needed, unchanged scope, high confidentiality and integrity loss, with AC:H reflecting the byte-exactness and configuration prerequisites.

Know when Jwt Attack gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

Remote unauthenticated forgery (AV:N/PR:N/UI:N), but AC:H because it needs a JWK-JSON-as-key config plus byte-exact serialization matching; C:H/I:H from auth bypass, A:N as availability is unaffected.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Oct 08, 2026 - 23:02 EUVD
CVE Published
Oct 08, 2026 - 21:53 cve.org
HIGH 7.4

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3 npm packages depend on fast-jwt (1 direct, 2 indirect)

Ecosystem-wide dependent count for version 6.2.4.

Technical POC Analysis

CWE-347 (Improper Verification of Cryptographic Signature).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

NearForm fast-jwt versions up to and including 6.2.4 contain a signature-verification bypass that allows forged HS256 authentication tokens to be accepted, effectively granting an attacker the identity and privileges of any user the application trusts - including administrative accounts. The exposure is confined to deployments that pass a raw serialized public JWK or JWKS JSON string as the verification key while permitting HS* algorithms, but where that pattern exists the outcome is a complete authentication and authorization bypass rather than a partial weakness. Leadership should care because a valid forged token bypasses the primary control protecting customer data, financial transactions, and privileged administrative functions, and publicly available exploit code exists.

Business Impact: High
Compensating Controls

Apply vendor patch (fast-jwt 6.3.0).

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Medium
popular Node.js JWT library (nearform), common in Fastify stacks but not universal
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

37
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +37
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2013-3900 MEDIUM
5.5 Dec 11

Why is Microsoft republishing a CVE from 2013? We are republishing CVE-2013-3900 in the Security Update Guide to update

CVE-2026-48558 CRITICAL POC
9.5 Jun 12

Authentication bypass in SimpleHelp 5.5.15 and prior (plus 6.0 pre-release builds) allows remote unauthenticated attacke

CVE-2026-5430 CRITICAL POC
10.0 Aug 06

Authentication bypass in WSO2 API Manager and related components (Universal Gateway, Traffic Manager, API Control Plane,

CVE-2025-59718 CRITICAL
9.8 Dec 09

Authentication bypass in Fortinet FortiOS, FortiProxy, and FortiSwitchManager allows unauthenticated remote attackers to

CVE-2025-25291 CRITICAL POC
9.3 Mar 12

ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Rated critical severity (CVS

CVE-2025-25292 CRITICAL POC
9.3 Mar 12

ruby-saml provides security assertion markup language (SAML) single sign-on (SSO) for Ruby. Rated critical severity (CVS

CVE-2022-25898 CRITICAL POC
9.8 Jul 01

The package jsrsasign before 10.5.25 are vulnerable to Improper Verification of Cryptographic Signature when JWS or JWT

CVE-2026-107722 CRITICAL POC
9.8 Oct 08

Authentication and authorization bypass in fast-jwt 6.2.0 through 6.2.4 (npm, NearForm) lets a remote, unauthenticated a

CVE-2024-42004 CRITICAL POC
9.8 Dec 18

A library injection vulnerability exists in Microsoft Teams (work or school) 24046.2813.2770.1094 for macOS. Rated criti

CVE-2024-41145 CRITICAL POC
9.8 Dec 18

A library injection vulnerability exists in the WebView.app helper app of Microsoft Teams (work or school) 24046.2813.27

CVE-2024-41138 CRITICAL POC
9.8 Dec 18

A library injection vulnerability exists in the com.microsoft.teams2.modulehost.app helper app of Microsoft Teams (work

CVE-2024-45409 CRITICAL POC
9.8 Sep 10

The Ruby SAML library is for implementing the client side of a SAML authorization. Rated critical severity (CVSS 9.8), t

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy