CVE-2026-25223: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-25223 is a Content-Type header validation bypass vulnerability in the Fastify Node.js web framework, allowing attackers to completely circumvent request body schema validation. By appending a tab character (\t) followed by arbitrary content to the Content-Type header (e.g., Content-Type: application/json\ta), the server bypasses JSON schema validation while still parsing the body as JSON. All Fastify versions prior to 5.7.2 are affected; the issue is described as a regression or missed edge case from a previously reported vulnerability fix. It was published on February 2, 2026, with a CVSS v3.1 base score of 7.5 (High) (Github Advisory, Fastify Security Advisory).

Technical details

The root cause is an interpretation conflict (CWE-436) combined with incorrect early validation ordering (CWE-179) between two internal Fastify modules. In lib/validation.js (line 272), the getEssenceMediaType function splits the Content-Type header on spaces or semicolons (/[ ;]/) and trims the result — but does not account for tab characters (\t). Meanwhile, lib/content-type-parser.js (line 125) explicitly treats a tab character as a valid delimiter when matching parsers, meaning a header like application/json\ta successfully routes to the JSON parser. The validation layer therefore looks up a schema key of application/json\ta (which has no registered schema), skips validation entirely, while the parser layer still processes the body as JSON — creating a complete bypass (Fastify Security Advisory, validation.js source, content-type-parser.js source). No authentication or special privileges are required; the attack is network-accessible with low complexity.

Impact

Successful exploitation allows an unauthenticated remote attacker to submit arbitrary request bodies that bypass all Content-Type-discriminated schema validation constraints enforced by the Fastify application. The primary impact is on data integrity (CVSS Integrity: High), as malicious or malformed data can be injected into application handlers that rely on validated input for security decisions, access control, or business logic enforcement. The concrete downstream impact depends on the handler implementation — potential consequences include injection attacks, privilege escalation within the application, data corruption, or bypassing security controls that depend on validated request structure (Github Advisory, Fastify Security Advisory).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported for CVE-2026-25223. The EPSS score is approximately 0.022% (6th percentile), indicating a low near-term exploitation probability (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The attack requires no authentication, no user interaction, and is exploitable over the network with low complexity, making it trivially reproducible by any attacker aware of the technique. The vulnerability was originally reported via HackerOne (report #3464114) (Fastify Security Advisory).

Exploitation steps

  1. Identify target: Locate a Fastify-based API endpoint (version < 5.7.2) that uses Content-Type-discriminated body validation schemas (e.g., a POST endpoint with a JSON body schema defined under schema.body.content['application/json']).
  2. Craft malicious Content-Type header: Construct an HTTP request with a modified Content-Type header by appending a tab character followed by arbitrary text: Content-Type: application/json\ta (where \t is the literal ASCII tab character, 0x09).
  3. Send the request: Submit the HTTP request with a body that would normally fail schema validation (e.g., missing required fields, wrong data types, or additional unexpected properties).
  4. Bypass achieved: Fastify's validation layer extracts application/json\ta as the content type key, finds no registered schema for it, and skips validation. The content-type parser layer still matches application/json (due to tab being a recognized delimiter) and parses the body as JSON.
  5. Exploit handler logic: The unvalidated body is passed to the route handler, where the attacker can inject unexpected data structures, bypass business logic checks, or exploit downstream processing that assumes the body has been validated (Fastify Security Advisory, content-type-parser.js source).

Indicators of compromise

  • Network: HTTP requests to Fastify API endpoints containing a Content-Type header with a tab character (ASCII 0x09) embedded after the media type (e.g., application/json\ta, application/json\t<arbitrary>); these may appear URL-encoded or as raw bytes in packet captures.
  • Logs: Web server or application access logs showing Content-Type header values with unusual characters or whitespace beyond standard spaces and semicolons; requests that result in unexpected application behavior (e.g., validation errors not triggered despite malformed bodies).
  • Application Behavior: Route handlers receiving request bodies that do not conform to the defined JSON schema without triggering a 400 validation error response; unexpected data types or missing required fields reaching business logic layers.

Mitigation and workarounds

Upgrade Fastify to version 5.7.2 or later, which resolves the vulnerability by introducing a proper ContentType parser class that normalizes and validates Content-Type headers before they are used for schema lookup or parser matching (Fastify Security Advisory, Fix Commit). If an immediate upgrade is not possible, add the following onRequest hook to reject any request containing a tab character in the Content-Type header:

fastify.addHook('onRequest', async (request, reply) => {
  const contentType = request.headers['content-type']
  if (contentType && contentType.includes('\t')) {
    reply.code(400).send({ error: 'Invalid Content-Type header' })
  }
})

IBM API Connect users should also apply the relevant IBM security updates (IBM Advisory 7273320, IBM Advisory 7273485).

Community reactions

The advisory was published by Fastify maintainer mcollina on February 2, 2026, with credit to contributor jsumners for the fix. A dev.to article noted that an AI code review tool (Gemini 2.5 Flash) identified an additional bug in the same file while reviewing the CVE fix PR, highlighting the complexity of the parsing logic involved (dev.to). Red Hat tracked the issue via Bugzilla (bug #2436560), and IBM issued advisories for affected API Connect products in May 2026 (IBM Advisory 7273320).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-gvwc-5hr5-44p8HIGH7.5
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5jh3-w3fj-6758LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5v8x-rm7w-m4c7LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-7pqp-3q23-mwr8LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-3qg4-7mq2-gm93MEDIUMN/A
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management