{"id":"CVE-2021-21321","aliases":["CVE-2021-21321","GHSA-qmw8-3v4g-gwj4"],"related":[],"kind":"vulnerability","state":"published","title":"Prefix escape","summary":"fastify-reply-from is an npm package which is a fastify plugin to forward the current http request to another server. In fastify-reply-from before version 4.0.2, 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.0.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fastify-reply-from is an npm package which is a fastify plugin to forward the current http request to another server. In fastify-reply-from before version 4.0.2, 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.0.2.","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\nA patch have been submitted by Corey Farrell git@cfware.com, the reporter.\nAll releases after v4.0.2 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-reply-from es un paquete npm que es un plugin fastify para reenviar la petición http actual a otro servidor.&#xa0;En fastify-reply-from anterior a la versión 4.0.2, al diseñar una URL específica, es posible escapar del prefijo del servicio de backend proxy.&#xa0;Si la URL base del servidor proxy es \"/pub/\", el usuario espera que no sea posible acceder a \"/priv\" en el servicio de destino.&#xa0;En versiones afectadas, es posible.&#xa0;Esto se corrige en la versión 4.0.2","source":"nvd"}],"published":"2021-03-02T03:35:25.000Z","modified":"2026-07-08T06:29:17.757Z","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":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"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.0.2","status":"affected"}],"vendor":"fastify","product":"fastify-reply-from","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.0.2"}],"ecosystem":"npm","package":"fastify-reply-from","purl":"pkg:npm/fastify-reply-from","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.0.2"}],"vendor":"fastify-reply-from_project","product":"fastify-reply-from","cpe":"cpe:2.3:a:fastify-reply-from_project:fastify-reply-from:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/fastify-reply-from","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21321","url":"https://www.cve.org/CVERecord?id=CVE-2021-21321","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:15.260Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qmw8-3v4g-gwj4","url":"https://github.com/advisories/GHSA-qmw8-3v4g-gwj4","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:17.757Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21321","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321","licence":"Public domain","modified":"2026-06-17T03:35:17.573Z"}],"updatedAt":"2026-11-25T22:58:00.109Z","epss":{"score":0.01844,"percentile":0.79647,"date":"2026-12-01T12:00:22.000Z"}}