{"id":"CVE-2021-21321","aliases":["GHSA-qmw8-3v4g-gwj4"],"summary":"Prefix escape","published_at":"2021-02-23T00:00:00Z","modified_at":"2026-07-08T06:29:17.757441Z","products":[],"rating":{"severity":"critical","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Critical","vendor_ratings":[{"source":"Red Hat","rating":"Critical"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.018209999427199364,"percentile":0.7922000288963318,"date":"2026-11-19T00:00:00Z"},"priority":12,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"fastify/fastify-reply-from","versions":["< 4.0.2"],"provider":"cvelistv5","source":"CVE-2021-21321","relation":"self"},{"ecosystem":"NVD","package":"fastify-reply-from_project:fastify-reply-from","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}],"fixed":["4.0.2"],"provider":"nvd","source":"CVE-2021-21321","relation":"self"},{"ecosystem":"npm","package":"fastify-reply-from","purl":"pkg:npm/fastify-reply-from","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}],"fixed":["4.0.2"],"provider":"osv","source":"GHSA-qmw8-3v4g-gwj4","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"affected","packages":["rhacm2/search-ui-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2021-21321"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-21321","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-21321","license":"CC-BY-4.0","published_at":"2021-03-02T03:35:25Z","modified_at":"2024-08-03T18:09:15.26Z","summary":"Prefix escape","details":"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":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","source":"CVE-2021-21321"}],"affected":[{"ecosystem":"CVE","package":"fastify/fastify-reply-from","versions":["< 4.0.2"],"provider":"cvelistv5","source":"CVE-2021-21321","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4"},{"type":"WEB","url":"https://www.npmjs.com/package/fastify-reply-from"},{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889"}]},{"provider":"nvd","source_id":"CVE-2021-21321","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321","severity":[],"affected":[{"ecosystem":"NVD","package":"fastify-reply-from_project:fastify-reply-from","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}],"fixed":["4.0.2"],"provider":"nvd","source":"CVE-2021-21321","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-qmw8-3v4g-gwj4","relation":"self","url":"https://osv.dev/vulnerability/GHSA-qmw8-3v4g-gwj4","license":"CC-BY-4.0","published_at":"2021-03-03T01:52:05Z","modified_at":"2026-07-08T06:29:17.757441Z","summary":"Prefix escape","details":"### 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)","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","source":"GHSA-qmw8-3v4g-gwj4"}],"affected":[{"ecosystem":"npm","package":"fastify-reply-from","purl":"pkg:npm/fastify-reply-from","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.0.2"}]}],"fixed":["4.0.2"],"provider":"osv","source":"GHSA-qmw8-3v4g-gwj4","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321"},{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889"},{"type":"WEB","url":"https://www.npmjs.com/package/fastify-reply-from"}]},{"provider":"redhat-vex","source_id":"CVE-2021-21321","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-21321","license":"CC-BY-4.0","published_at":"2021-02-23T00:00:00Z","modified_at":"2021-08-06T00:50:44Z","summary":"fastify-reply-from: crafted URL allows prefix scape of the proxied backend service","details":"A flaw was found in fastify-reply-from. Escaping of the prefix of the proxied backend service is possible allowing an attacker, using a specially crafted URL, to gain access to directories that would otherwise be out of bounds. The highest threat from this vulnerability is to data confidentiality and integrity.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","source":"CVE-2021-21321"},{"type":"Red Hat","score":"Critical","source":"CVE-2021-21321"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"affected","packages":["rhacm2/search-ui-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2021-21321"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-21321.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-21321"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1942178"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-21321"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321"},{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4"}]}],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4"},{"type":"WEB","url":"https://www.npmjs.com/package/fastify-reply-from"},{"type":"WEB","url":"https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-21321.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-21321"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1942178"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-21321"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-21321","url":"https://www.cve.org/CVERecord?id=CVE-2021-21321","license":"CC-BY-4.0","modified_at":"2024-08-03T18:09:15.26Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-21321","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21321","relation":"self"},{"provider":"osv","source_id":"GHSA-qmw8-3v4g-gwj4","url":"https://osv.dev/vulnerability/GHSA-qmw8-3v4g-gwj4","license":"CC-BY-4.0","modified_at":"2026-07-08T06:29:17.757441Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-21321","url":"https://access.redhat.com/security/cve/CVE-2021-21321","license":"CC-BY-4.0","modified_at":"2021-08-06T00:50:44Z","relation":"self"}]}
