{"id":"GHSA-573f-x89g-hqp9","revision":"26463bb7160d4a43adc830879a8246bc","records":[{"revision":"26463bb7160d4a43adc830879a8246bc","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-573f-x89g-hqp9","aliases":["CVE-2026-3419"],"title":"Fastify's Missing End Anchor in \"subtypeNameReg\" Allows Malformed Content-Types to Pass Validation","description":"# Description\n\nFastify incorrectly accepts malformed `Content-Type` headers containing trailing characters after the subtype token, in violation of [RFC 9110 §8.3.1](https://httpwg.org/specs/rfc9110.html#field.content-type). 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`.\n\nWhen 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.\n\n## Impact\n\nAn 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.\n\n## Workarounds\n\nDeploy a WAF rule to protect against this\n\n## Fix\n\nThe fix is available starting with v5.8.1.","state":0,"publishedAt":"2026-03-05T21:29:54+00:00","modifiedAt":"2026-07-08T08:14:43.6259688+00:00","affected":[{"ecosystem":"npm","name":"fastify","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.7.2"},{"kind":"fixed","version":"5.8.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/fastify/fastify/security/advisories/GHSA-573f-x89g-hqp9","https://nvd.nist.gov/vuln/detail/CVE-2026-3419","https://github.com/fastify/fastify/commit/67f6c9b32cb3623d3c9470cc17ed830dd2f083d7","https://cna.openjsf.org/security-advisories.html","https://github.com/advisories/GHSA-573f-x89g-hqp9","https://github.com/fastify/fastify","https://httpwg.org/specs/rfc9110.html#field.content-type","https://www.cve.org/CVERecord?id=CVE-2026-3419"],"sourceUrl":"https://github.com/advisories/GHSA-573f-x89g-hqp9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-573f-x89g-hqp9","identifiers":["GHSA-573f-x89g-hqp9","CVE-2026-3419"]},"retained":false,"historicalAffected":[]}],"coverage":[]}