Low

fastify is vulnerable to header validation bypass via case-sensitive propertyNames

  • Disclosed: 22.10.2026
  • Updated: 22.10.2026 20:17

Impact

Fastify lowercases header names in a headers schema before compilation, because Node.js stores request header names in lowercase. This normalization does not reach the header names held in a propertyNames subschema's enum and const. A header-name deny-list written in the canonical header case, such as propertyNames: { not: { enum: ['X-Debug-Override'] } }, therefore never matches the lowercased request headers, and the forbidden header reaches the handler. Any application that uses a propertyNames deny-list or allow-list to constrain request header names does not get the constraint it expects. The same rule written in lowercase works, and the not: { required: [...] } form is unaffected, so this is a gap in the built-in normalization rather than a wrong schema. This is an incomplete fix of CVE-2026-84428 (GHSA-9q9j-q6p8-xq58), whose normalization covered header names used as property keys but not those used as values inside propertyNames.

Patches

Users should upgrade to fastify 5.12.6 or later, which lowercases header names held in enum and const inside a propertyNames subschema so they match the lowercased request headers. Header-name constraints that cannot be normalized automatically, regular expressions (propertyNames pattern and patternProperties keys) and a $ref used inside propertyNames, are documented and, for the $ref case, warned at startup (FSTSEC003). Author those to match the lowercased request headers.

Workarounds

Write the propertyNames header-name constraint in lowercase (for example enum: ['x-debug-override']), or enforce the header check in an onRequest or preValidation hook instead of the schema.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package fastify >= 5.12.2, < 5.12.6 5.12.6

References

CVSS score 3.7/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness (CWE)
CWE-178
Platform
npm
Package
fastify
Disclosed
22.10.2026
Updated
22.10.2026 20:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-389g-gv7q-r4x8 - CC BY 4.0

Vulnerability history: fastify

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (17) in the archive
Total entries
17
First → latest
07.2018 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 8
  • Medium 7
  • Low 2

Disclosures per year

  1. 2018: 1
  2. 2019: 0
  3. 2020: 1
  4. 2021: 0
  5. 2022: 2
  6. 2023: 0
  7. 2024: 0
  8. 2025: 1
  9. 2026: 12
Severity:
  1. fastify is vulnerable to header validation bypass via case-sensitive propertyNames this entry
    Low · 3.7 CVE-2026-107832 >= 5.12.2, < 5.12.6 5.12.6
  2. High · 7.5 CVE-2025-32442 >= 5.0.0, < 5.3.2, >= 4.29.0, < 4.29.1 5.3.2, 4.29.1
  3. High · 7.5 CVE-2022-39288 >= 4.0.0, < 4.8.1 4.8.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.