GHSA-389g-gv7q-r4x8: Low severity npm/fastify vulnerability

Published Oct 22, 2026
·
Updated

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

1 affected componentFixes available
npm/fastify>=5.12.2<5.12.6
5.12.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/fastify to a version that resolves this vulnerability.

    Fixed in 5.12.6
  2. Upgrade

    Upgrade fastify to a version that resolves this vulnerability.

    Fixed in 5.12.6
  3. Configuration

    Write propertyNames header-name constraints in lowercase, including enum and const values; for example, use enum: ['x-debug-override'].

    Fastify headers schema propertyNames header-name constraint = lowercase

Event History

Oct 22, 2026
Advisory Published
via GitHub·04:40 PM
Data Sourced
via GitHub·04:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which Fastify applications are exposed to this issue?

Applications are affected if they use a headers schema with a propertyNames allow-list or deny-list whose enum or const values use canonical or mixed-case header names. Header names represented as schema property keys are not the affected case, and not: { required: [...] } rules are unaffected.

2

What does an attacker need to do to bypass the header constraint?

An attacker must send a header that the application intends to deny or exclude through a propertyNames enum or const rule written with non-lowercase header names. Because Node.js supplies request header names in lowercase, the comparison does not match and the header reaches the handler.

3

Is there a configuration workaround if upgrading is not immediately possible?

Write all header-name values used in propertyNames enum and const constraints in lowercase. Alternatively, use the unaffected not: { required: [...] } form where appropriate.

4

How can I determine whether my schemas are affected?

Review headers schemas for propertyNames subschemas containing enum or const values used to allow or deny header names. Any such header-name values that are not lowercase may fail to constrain the lowercase request headers seen by Fastify.

5

What version contains the fix?

Upgrade Fastify to version 5.12.6 or later. The fix lowercases header names held in enum and const within propertyNames subschemas.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203