CVE-2026-3419

CVE-2026-3419 is a medium-severity security vulnerability in fastify (npm), affecting versions >= 5.7.2, <= 5.8.0. It is fixed in 5.8.1.

Summary

Description

Fastify incorrectly accepts malformed Content-Type headers containing trailing characters after the subtype token, in violation of RFC 9110 §8.3.1. For example, a request sent with Content-Type: application/json garbage passes validation and is processed normally, rather than being rejected with 415 Unsupported Media Type.

When regex-based content-type parsers are in use (a documented Fastify feature), the malformed value is matched against registered parsers using the full string including the trailing garbage. This means a request with an invalid content-type may be routed to and processed by a parser it should never have reached.

Workarounds

Deploy a WAF rule to protect against this

Impact

An attacker can send requests with RFC-invalid Content-Type headers that bypass validity checks, reach content-type parser matching, and be processed by the server. Requests that should be rejected at the validation stage are instead handled as if the content-type were valid.

CVE-2026-3419 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.8.1); upgrading removes the vulnerable code path.

Affected versions

fastify (>= 5.7.2, <= 5.8.0)

Security releases

fastify → 5.8.1 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

The fix is available starting with v5.8.1.

Frequently Asked Questions

  1. What is CVE-2026-3419? CVE-2026-3419 is a medium-severity security vulnerability in fastify (npm), affecting versions >= 5.7.2, <= 5.8.0. It is fixed in 5.8.1.
  2. How severe is CVE-2026-3419? CVE-2026-3419 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of fastify are affected by CVE-2026-3419? fastify (npm) versions >= 5.7.2, <= 5.8.0 is affected.
  4. Is there a fix for CVE-2026-3419? Yes. CVE-2026-3419 is fixed in 5.8.1. Upgrade to this version or later.
  5. Is CVE-2026-3419 exploitable, and should I be worried? Whether CVE-2026-3419 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-3419 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-3419? Upgrade fastify to 5.8.1 or later.

Other vulnerabilities in fastify

CVE-2026-33806CVE-2026-3635CVE-2026-25224CVE-2026-25223CVE-2025-32442

Stop the waste.
Protect your environment with Kodem.