{"id":"CVE-2026-84428","aliases":["CVE-2026-84428","GHSA-9q9j-q6p8-xq58"],"related":[],"kind":"vulnerability","state":"published","title":"fastify vulnerable to header validation bypass via incomplete schema case normalization","summary":"fastify versions before 5.12.2 implement the case-insensitive nature of HTTP header names by lowercasing names in a route's header schema before compiling it, but the transformation is incomplete: it lowercases the properties keys and the root-level required array, and does not lowercase the trigger and dependent names inside the JSON Schema Draft 7 dependencies keyword. Because Node stores request header names in lowercase, a canonical-case dependency such as requiring an authentication header whenever a privileged-mode header is present never matches, and the presence assertion is silently skipped. An unauthenticated remote client can therefore send the header that activates a privileged branch while omitting the header the dependency was meant to require, bypassing the conditional check. Users should upgrade to fastify 5.12.2 or later.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fastify versions before 5.12.2 implement the case-insensitive nature of HTTP header names by lowercasing names in a route's header schema before compiling it, but the transformation is incomplete: it lowercases the properties keys and the root-level required array, and does not lowercase the trigger and dependent names inside the JSON Schema Draft 7 dependencies keyword. Because Node stores request header names in lowercase, a canonical-case dependency such as requiring an authentication header whenever a privileged-mode header is present never matches, and the presence assertion is silently skipped. An unauthenticated remote client can therefore send the header that activates a privileged branch while omitting the header the dependency was meant to require, bypassing the conditional check. Users should upgrade to fastify 5.12.2 or later.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nFastify lowercases header-schema property names before compiling the schema, because Node.js stores request header names in lowercase. That normalization was incomplete: it lowercased only top-level `properties` keys and the root `required` array, and did not lowercase the JSON Schema Draft 7 `dependencies` keyword (its trigger keys and dependent property names) or names in nested subschemas. As a result, a header schema that uses `dependencies` to require one header when another is present (for example `X-Admin` requiring `X-Admin-Token`) never matches the lowercased request headers, so the dependency assertion is silently skipped. An unauthenticated remote client can send the header that activates a privileged path while omitting the header the dependency was meant to require, bypassing a schema-enforced security control. The header schema is idiomatic, valid JSON Schema Draft 7, and no custom validator, malformed request, or misconfiguration is required.\n\n### Patches\n\nHeader-schema names are now normalized across all schema positions (`properties`, `required`, `dependencies`, `dependentRequired`, `dependentSchemas`, and nested subschemas). Patched in fastify `5.12.2`. The fix is also included in the `6.0.0` release. Header schemas referenced through an external shared `$ref` (registered with `addSchema`) are not reached by this normalization and now emit an `FSTSEC002` startup warning; inline the header schema to keep case-insensitive assertions in effect.\n\n### Workarounds\n\nIf upgrading is not immediately possible, write header-schema names in lowercase so the `dependencies` and other case-sensitive assertions match Node's lowercased request headers, or enforce the cross-header requirement in an `onRequest` or `preValidation` hook instead of the schema.","format":"markdown","source":"ghsa"}],"published":"2026-09-04T10:24:27.809Z","modified":"2026-10-01T00:00:05.759Z","severity":{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-178"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"5.12.2","status":"affected"},{"type":"semver","version":"5.12.2","status":"unaffected"}],"vendor":"fastify","product":"fastify","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.12.2"}],"ecosystem":"npm","package":"fastify","purl":"pkg:npm/fastify","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.12.2"}],"vendor":"fastify","product":"fastify","cpe":"cpe:2.3:a:fastify:fastify:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-9q9j-q6p8-xq58","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84428","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify/commit/179619c8e99d54924309b9933402151ef9af37e0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify/releases/tag/v5.12.2","tags":["web"],"sources":["ghsa"]}],"credits":["schecthellraiser606","mcollina","UlisesGascon"],"assigner":"openjs","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-09-04T16:04:59.730Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-84428","url":"https://www.cve.org/CVERecord?id=CVE-2026-84428","licence":"CVE Terms of Use","modified":"2026-09-04T16:06:04.123Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9q9j-q6p8-xq58","url":"https://github.com/advisories/GHSA-9q9j-q6p8-xq58","licence":"CC-BY-4.0","modified":"2026-10-01T00:00:05.759Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-84428","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84428","licence":"Public domain","modified":"2026-09-15T19:54:32.420Z"}],"updatedAt":"2026-11-25T22:59:36.272Z","epss":{"score":0.00381,"percentile":0.34196,"date":"2026-12-01T12:00:22.000Z"}}