# CVE-2021-21321: Prefix escape

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.84%, higher than 79% of CVEs (2026-12-01)
- Published: 2021-03-02T03:35:25.000Z
- Modified: 2026-07-08T06:29:17.757Z
- Also known as: GHSA-qmw8-3v4g-gwj4
- Weaknesses: CWE-20
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- fastify fastify-reply-from: < 4.0.2
- fastify-reply-from (npm): before 4.0.2
- fastify-reply-from_project fastify-reply-from: before 4.0.2

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/fastify/fastify-reply-from/security/advisories/GHSA-qmw8-3v4g-gwj4> (third-party-advisory, web)
- <https://www.npmjs.com/package/fastify-reply-from> (product, third-party-advisory, web)
- <https://github.com/fastify/fastify-reply-from/commit/dea227dda606900cc01870d08541b4dcc69d3889> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21321> (advisory)

## Sources

- CVE List: [CVE-2021-21321](https://www.cve.org/CVERecord?id=CVE-2021-21321), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-qmw8-3v4g-gwj4](https://github.com/advisories/GHSA-qmw8-3v4g-gwj4), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-21321](https://nvd.nist.gov/vuln/detail/CVE-2021-21321), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21321 · Whole record: https://cve.day/CVE-2021-21321.json · Rebuilt by cve.day 2026-11-25T22:58:00.109Z
