{"id":"CVE-2021-21321","aliases":["EUVD-2021-0698","GHSA-qmw8-3v4g-gwj4"],"status":"published","title":"Prefix escape","description":"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.","severity":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.01821,"percentile":0.79064,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2021-03-02T03:35:25Z","modified":"2026-10-20T10:54:28Z","fixes":[{"ecosystem":"npm","package":"fastify-reply-from","fixed_in":["4.0.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"fastify-reply-from","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}]},{"source":"osv","ecosystem":"npm","package":"fastify-reply-from","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}]}],"products":[{"vendor":"fastify","product":"fastify-reply-from"},{"vendor":"fastify-reply-from_project","product":"fastify-reply-from"}],"references":[{"url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.npmjs.com/package/fastify-reply-from","tags":["x_refsource_MISC","x_transferred","Product","Third Party Advisory","advisory","web"]},{"url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-qmw8-3v4g-gwj4"}],"sources":{"cve":[{"id":"CVE-2021-21321","title":"Prefix escape","description":"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.","status":"published","published":"2021-03-02T03:35:25Z","modified":"2024-08-03T18:09:15.26Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2021-0698","description":"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.","status":"published","published":"2021-03-02T03:35:25Z","modified":"2024-08-03T18:09:15Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-03T03:25:06.913643Z"}],"ghsa":[{"id":"GHSA-qmw8-3v4g-gwj4","title":"Prefix escape","description":"### 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)","status":"published","published":"2021-03-03T01:52:05Z","modified":"2023-02-01T05:05:12Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:36:32.918681Z"}],"nvd":[{"id":"CVE-2021-21321","description":"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.","status":"published","published":"2021-03-02T04:15:12.487Z","modified":"2026-06-17T03:35:17.573Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"secondary"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:06:50.399901Z"}],"osv":[{"id":"CVE-2021-21321","description":"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.","status":"published","published":"2021-03-02T04:15:12.487Z","modified":"2026-10-20T10:54:28.526817567Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:18.004149Z"},{"id":"GHSA-qmw8-3v4g-gwj4","title":"Prefix escape","description":"### 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)","status":"published","published":"2021-03-03T01:52:05Z","modified":"2026-07-08T06:29:17.757441041Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:54.760124Z"}]}}
