{"id":"CVE-2022-39288","aliases":["GHSA-455w-c45v-86rg"],"url":"https://o3.security/vulnerability/CVE-2022-39288","summary":"Denial of service in Fastify via Content-Type header","details":"### Impact\nAn attacker can send an invalid `Content-Type` header that can cause the application to crash, leading to a possible Denial of Service attack. Only the v4.x line is affected.\n\n(This was updated: upon a close inspection, v3.x is not affected after all).\n\n### Patches\nYes, update to `> v4.8.0`.\n\n### Workarounds\nYou can reject the malicious content types before the body parser enters in action.\n```js\n  const badNames = Object.getOwnPropertyNames({}.__proto__)\n  fastify.addHook('onRequest', async (req, reply) => {\n    for (const badName of badNames) {\n      if (req.headers['content-type'].indexOf(badName) > -1) {\n        reply.code(415)\n        throw new Error('Content type not supported')\n      }\n    }\n  })\n```\n\n### References\n\nSee the HackerOne report [#1715536](https://hackerone.com/bugs?report_id=1715536&subject=fastify)\n\n### For more information\n[Fastify security policy](https://github.com/fastify/fastify/security/policy)\n","published":"2022-10-10T00:00:00Z","modified":"2026-08-12T03:51:32.673802550Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.59244,"percentile":0.9907,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"fastify","fixedVersion":"4.8.1"}],"fix":{"url":"https://github.com/fastify/fastify/commit/fbb07e8dfad74c69cd4cd2211aedab87194618e3","label":"fastify/fastify@fbb07e8"},"references":[{"type":"WEB","url":"https://github.com/fastify/fastify/security/policy"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39288.json"},{"type":"ADVISORY","url":"https://github.com/fastify/fastify/security/advisories/GHSA-455w-c45v-86rg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39288"},{"type":"FIX","url":"https://github.com/fastify/fastify/commit/fbb07e8dfad74c69cd4cd2211aedab87194618e3"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify"},{"type":"WEB","url":"https://hackerone.com/bugs?report_id=1715536&subject=fastify"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:32.673802550Z"}}