GHSA-389g-gv7q-r4x8

Suggest an improvement
Source
https://github.com/advisories/GHSA-389g-gv7q-r4x8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-389g-gv7q-r4x8/GHSA-389g-gv7q-r4x8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-389g-gv7q-r4x8
Aliases
Published
2026-10-22T16:40:35Z
Modified
2026-10-22T16:45:04Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
fastify is vulnerable to header validation bypass via case-sensitive propertyNames
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-178"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-22T16:40:35Z",
    "nvd_published_at":  "2026-10-13T14:17:19Z",
    "severity":  "LOW"
}
References

Affected packages

npm / fastify

Package

Affected ranges

Type
SEMVER
Events
Introduced
5.12.2
Fixed
5.12.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-389g-gv7q-r4x8/GHSA-389g-gv7q-r4x8.json"