{"id":"CVE-2026-3419","published":"2026-03-06T17:50:58Z","modified":"2026-03-09T14:55:21Z","title":"Fastify's Missing End Anchor in \"subtypeNameReg\" Allows Malformed Content-Types to Pass Validation","vendor":"fastify","product":"fastify","tier":"tail","description":{"text":"Fastify 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\nImpact:\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\nWorkarounds:\nDeploy a WAF rule to protect against this\n\nFix:\n\nThe fix is available starting with v5.8.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00388,"percentile":0.33721,"provenance":"source"},"cwes":[{"id":"CWE-185","name":"Incorrect Regular Expression"}],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-573f-x89g-hqp9","tags":[]},{"url":"https://github.com/fastify/fastify/commit/67f6c9b32cb3623d3c9470cc17ed830dd2f083d7","tags":[]},{"url":"https://httpwg.org/specs/rfc9110.html#field.content-type","tags":[]},{"url":"https://github.com/advisories/GHSA-573f-x89g-hqp9","tags":[]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":[]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-3419","tags":[]}],"priority":{"score":10.5,"factors":[{"name":"EPSS percentile","points":6.74},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify","versions":[">= 5.7.2, < 5.8.1"]}],"fixedVersions":[{"vendor":"fastify","product":"fastify","versions":["5.8.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-03-09T14:55:13.971640Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fastify","vulnerableRanges":[">=5.7.2, <5.8.1"],"patched":["5.8.1"],"from":["GHSA-573f-x89g-hqp9"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-10056","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-fastify-cve-2026-25223","parents":[{"from":"CVE-2026-25223","to":"CVE-2026-3419","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/content-type.js"],"commits":["https://github.com/fastify/fastify/commit/32d7b6add39ddf082d92579a58bea7018c5ac821","https://github.com/fastify/fastify/commit/67f6c9b32cb3623d3c9470cc17ed830dd2f083d7"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-32442","published":"2025-04-18","fixed":"5.3.2","kev":false},{"cve":"CVE-2026-25223","published":"2026-02-03","fixed":"5.7.2","kev":false},{"cve":"CVE-2026-25224","published":"2026-02-03","fixed":"5.7.3","kev":false,"link":{"from":"CVE-2026-25224","to":"CVE-2026-3419","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fastify","fromFixed":"5.7.3","toFixed":"5.8.1","daysApart":31}]}},{"cve":"CVE-2026-3419","published":"2026-03-06","fixed":"5.8.1","kev":false},{"cve":"CVE-2026-3635","published":"2026-03-23","fixed":"5.8.3","kev":false,"link":{"from":"CVE-2026-3419","to":"CVE-2026-3635","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fastify","fromFixed":"5.8.1","toFixed":"5.8.3","daysApart":17}]}},{"cve":"CVE-2026-33806","published":"2026-04-15","fixed":"5.8.5","kev":false},{"cve":"CVE-2026-16732","published":"2026-08-18","fixed":"5.12.1","kev":false}],"package":"npm:fastify"}}