Live threats

All CVEs / nearform

CVE-2026-107722nearform fast-jwt

Authentication bypass via RSA public key misclassification in fast-jwt

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
Oct 8, 2026
Updated
Oct 13, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-347
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

fast-jwt versions 6.2.0 through 6.3.0 can misclassify RSA public keys as HMAC secrets when non-whitespace content precedes the PEM header. An attacker knowing the public key bytes can sign arbitrary HS256 claims, resulting in authentication or authorization bypass when HS256 is inferred or allowed.

Show the original NVD text

fast-jwt provides fast JSON Web Token (JWT) implementation. From 6.2.0 until 6.3.0, fast-jwt can misclassify RSA public-key text as an HMAC secret when the key has non-whitespace content before its PEM header. In src/crypto.js, performDetectPublicKeyAlgorithms trims whitespace but publicKeyPemMatcher remains start-anchored, so comments, control characters, zero-width characters, or wrapper text can prevent PEM detection and reach the HMAC fallback. An attacker who knows the public key bytes can sign arbitrary HS256 claims with that public material when HS256 is inferred or allowed, resulting in authentication or authorization bypass. An asymmetric-only algorithm allowlist prevents the attack. This issue is fixed in version 6.3.0.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 6.3.0

Update fast-jwt to version 6.3.0 or later. Alternatively, use an asymmetric-only algorithm allowlist to prevent the attack.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for fast-jwt.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm fast-jwt ≥ 6.2.0 < 6.3.0 6.3.0 npm install fast-jwt@6.3.0

Per OSV / GitHub Advisories (GHSA-ww5h-9m49-7xx4). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.