{"id":"CVE-2021-21321","published":"2021-03-02T03:35:25Z","modified":"2024-08-03T18:09:15Z","title":"Prefix escape","vendor":"fastify","product":"fastify-reply-from","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01821,"percentile":0.79286,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4","tags":["x_refsource_CONFIRM"]},{"url":"https://www.npmjs.com/package/fastify-reply-from","tags":["x_refsource_MISC"]},{"url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889","tags":["x_refsource_MISC"]}],"priority":{"score":22.9,"factors":[{"name":"EPSS percentile","points":15.86},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify-reply-from","versions":["< 4.0.2"]}],"affected":[{"ecosystem":"npm","package":"fastify-reply-from","vulnerableRanges":["<4.0.2"],"patched":["4.0.2"],"from":["GHSA-qmw8-3v4g-gwj4"],"provenance":"source"}],"summary":{"text":"The fastify-reply-from npm package, a Fastify plugin that forwards incoming HTTP requests to another server, contains a prefix-escape flaw in its URL handling. An unauthenticated remote attacker who sends a specially crafted URL can reach paths outside the configured base path of the proxied backend, such as accessing \"/priv\" when the base URL is \"/pub/\", with no user interaction or special configuration required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:39:46Z"},"euvd":{"id":"EUVD-2021-0698","exploited":false,"provenance":"source"}}