Skip to content

← Actionable
Medium, CVSS 5.3amended

Fastify's Missing End Anchor in "subtypeNameReg" Allows Malformed Content-Types to Pass Validation

CVE-2026-3419GHSA-573f-x89g-hqp9

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (fastify 5.8.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm fastify

    Affected
    >= 5.7.2, <= 5.8.0
    Fixed in
    5.8.1

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
  • CVE-2026-3419: 0.39% estimated exploitation activity in the next 30 days; percentile 32.91 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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. 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. Workarounds Deploy a WAF rule to protect against this Fix The…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-573f-x89g-hqp9

  2. Revision 1 · created ·

    Published from osv record GHSA-573f-x89g-hqp9

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-3419

Advisory: Fastify's Missing End Anchor in "subtypeNameReg" Allows Malformed Content-Types to Pass Validation
IDs: CVE-2026-3419, GHSA-573f-x89g-hqp9
Record: https://patchnext.com/advisories/cve-2026-3419 (revision 2, source checked 26 Oct 2026, 12:43 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: fastify 5.8.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm fastify: affected >= 5.7.2, <= 5.8.0; fixed in 5.8.1

## Suggested inspection (read-only)
- `npm ls fastify --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on fastify.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-573f-x89g-hqp9 (OSV record GHSA-573f-x89g-hqp9 lists affected ranges: npm fastify >=5.7.2 <5.8.1 (fixed))
- Verified: https://github.com/advisories/GHSA-573f-x89g-hqp9 (GitHub-reviewed advisory GHSA-573f-x89g-hqp9 lists affected ranges: npm fastify >=5.7.2 <=5.8.0)

Commands are suggestions: review each one before running it.

Loading voting…