CVE-2026-25223

7.5 HIGH

📋 TL;DR

Fastify versions before 5.7.2 have a validation bypass vulnerability where attackers can circumvent request body validation by appending a tab character followed by arbitrary content to the Content-Type header. This allows malicious payloads to bypass validation while the server still processes them as the original content type. All Fastify applications using request body validation are affected.

💻 Affected Systems

Products:
  • Fastify
Versions: All versions before 5.7.2
Operating Systems: All operating systems running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using Fastify's built-in request body validation with Content-Type based schema selection.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could inject malicious data that bypasses validation, potentially leading to injection attacks, data corruption, or unauthorized actions depending on the application logic.

🟠

Likely Case

Attackers bypass input validation to submit malformed or malicious data that should have been rejected, potentially causing application errors or data integrity issues.

🟢

If Mitigated

With proper input sanitization at the application layer and additional validation checks, the impact would be limited to potential validation bypass without direct exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is simple to exploit by modifying HTTP headers, and proof-of-concept code is available in the advisory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.7.2

Vendor Advisory: https://github.com/fastify/fastify/security/advisories/GHSA-jx2c-rxcm-jvmq

Restart Required: Yes

Instructions:

1. Update Fastify to version 5.7.2 or later using npm: npm update fastify
2. Restart your Node.js application
3. Verify the update was successful

🔧 Temporary Workarounds

Content-Type Header Validation

all

Implement middleware to validate and sanitize Content-Type headers before they reach Fastify's parser

Input Validation Enhancement

all

Add additional validation layers in application code beyond Fastify's built-in validation

🧯 If You Can't Patch

  • Implement WAF rules to block HTTP requests with tab characters in Content-Type headers
  • Deploy additional validation middleware that strips or rejects malformed Content-Type headers

🔍 How to Verify

Check if Vulnerable:

Check your package.json or run: npm list fastify | grep fastify

Check Version:

npm list fastify | grep fastify

Verify Fix Applied:

Verify Fastify version is 5.7.2 or higher: npm list fastify

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with Content-Type headers containing tab characters (\t)
  • Validation errors that should have been triggered but weren't

Network Indicators:

  • HTTP requests with malformed Content-Type headers containing tab characters

SIEM Query:

http.content_type:*\t* OR http.headers.content_type:*\t*

🔗 References

📤 Share & Export