{"id":"CVE-2021-21322","aliases":["CVE-2021-21322","GHSA-c4qr-gmr9-v23w"],"related":[],"kind":"vulnerability","state":"published","title":"Prefix escape","summary":"fastify-http-proxy is an npm package which is a fastify plugin for proxying your http requests to another server, with hooks. By crafting a specific URL, it is possible to escape the prefix of the proxied backend service. If the base url of the proxied server is `/pub/`, a user expect that accessing `/priv` on the target service would not be possible. In affected versions, it is possible. This is fixed in version 4.3.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fastify-http-proxy is an npm package which is a fastify plugin for proxying your http requests to another server, with hooks. By crafting a specific URL, it is possible to escape the prefix of the proxied backend service. If the base url of the proxied server is `/pub/`, a user expect that accessing `/priv` on the target service would not be possible. In affected versions, it is possible. This is fixed in version 4.3.1.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nBy crafting a specific URL, it is possible to escape the prefix of the proxied backend service.\nIf the base url of the proxied server is `/pub/`, a user expect that accessing `/priv` on the target service would not be possible. Unfortunately, it is.\n\n[CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N)\n\n### Patches\n\nAll releases after v4.3.1 include the fix.\n\n### Workarounds\n\nThere are no workaround available.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [fastify-reply-from](https://github.com/fastify/fastify-reply-from)\n* Email us at [hello@matteocollina.com](mailto:hello@matteocollina.com)","format":"markdown","source":"ghsa"},{"lang":"es","text":"fastify-http-proxy es un paquete npm que es un plugin fastify para enviar sus peticiones http a otro servidor, con hooks.&#xa0;Al diseñar una URL específica, es posible escapar el prefijo del servicio del backend proxy.&#xa0;Si la URL base del servidor proxy es \"/pub/\", un usuario espera que no sea posible acceder a \"/priv\" en el servicio objetivo.&#xa0;En versiones afectadas, es posible.&#xa0;Esto es corregido en la versión 4.3.1","source":"nvd"}],"published":"2021-03-02T03:35:17.000Z","modified":"2026-07-08T06:28:05.180Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 4.3.1","status":"affected"}],"vendor":"fastify","product":"fastify-http-proxy","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.3.1"}],"ecosystem":"npm","package":"fastify-http-proxy","purl":"pkg:npm/fastify-http-proxy","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.3.1"}],"vendor":"fastify-http-proxy_project","product":"fastify-http-proxy","cpe":"cpe:2.3:a:fastify-http-proxy_project:fastify-http-proxy:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fastify/fastify-http-proxy/security/advisories/GHSA-c4qr-gmr9-v23w","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/fastify-http-proxy","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-http-proxy/commit/02d9b43c770aa16bc44470edecfaeb7c17985016","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21322","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21322","url":"https://www.cve.org/CVERecord?id=CVE-2021-21322","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:15.229Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c4qr-gmr9-v23w","url":"https://github.com/advisories/GHSA-c4qr-gmr9-v23w","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:05.180Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21322","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21322","licence":"Public domain","modified":"2026-06-17T03:35:17.690Z"}],"updatedAt":"2026-11-25T22:58:00.110Z","epss":{"score":0.01647,"percentile":0.77179,"date":"2026-12-01T12:00:22.000Z"}}