{"id":"CVE-2022-39288","aliases":["CVE-2022-39288","GHSA-455w-c45v-86rg"],"related":[],"kind":"vulnerability","state":"published","title":"Denial of service in Fastify via Content-Type header","summary":"fastify is a fast and low overhead web framework, for Node.js. Affected versions of fastify are subject to a denial of service via malicious use of the Content-Type header. An attacker can send an invalid Content-Type header that can cause the application to crash. This issue has been addressed in commit `fbb07e8d` and will be included in release version 4.8.1. Users are advised to upgrade. Users unable to upgrade may manually filter out http content with malicious Content-Type headers.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fastify is a fast and low overhead web framework, for Node.js. Affected versions of fastify are subject to a denial of service via malicious use of the Content-Type header. An attacker can send an invalid Content-Type header that can cause the application to crash. This issue has been addressed in commit `fbb07e8d` and will be included in release version 4.8.1. Users are advised to upgrade. Users unable to upgrade may manually filter out http content with malicious Content-Type headers.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"fastify es un framework web rápido y de baja sobrecarga, para Node.js. Las versiones afectadas de fastify están sujetas a una denegación de servicio por medio del uso malicioso del encabezado Content-Type. Un atacante puede enviar un encabezado Content-Type no válida que puede causar el bloqueo de la aplicación. Este problema ha sido abordado en el commit \"fbb07e8d\" y será incluido en versión 4.8.1. Es recomendado a usuarios actualizar. Los usuarios que no puedan actualizar pueden filtrar manualmente el contenido http con encabezados Content-Type maliciosos","source":"nvd"}],"published":"2022-10-10T00:00:00.000Z","modified":"2026-06-17T04:58:04.633Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","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:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-754"],"affected":[{"ranges":[{"version":">= 4.0.0, < 4.8.1","status":"affected"}],"vendor":"fastify","product":"fastify","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.8.1"}],"ecosystem":"npm","package":"fastify","purl":"pkg:npm/fastify","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.8.1"}],"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-455w-c45v-86rg","tags":["mitigation","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify/commit/fbb07e8dfad74c69cd4cd2211aedab87194618e3","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify/security/policy","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39288","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify","tags":["package"],"sources":["ghsa"]},{"url":"https://hackerone.com/bugs?report_id=1715536&subject=fastify","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-04-23T15:50:15.699Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-39288","url":"https://www.cve.org/CVERecord?id=CVE-2022-39288","licence":"CVE Terms of Use","modified":"2025-04-23T16:51:56.095Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-455w-c45v-86rg","url":"https://github.com/advisories/GHSA-455w-c45v-86rg","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:17.835Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-39288","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39288","licence":"Public domain","modified":"2026-06-17T04:58:04.633Z"}],"updatedAt":"2026-11-25T22:58:15.499Z","epss":{"score":0.59244,"percentile":0.99133,"date":"2026-12-01T12:00:22.000Z"}}