CVE-2021-21321: Prefix escape

Published Feb 23, 2021
·
Updated

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.

Other sources

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 Software

2 affected componentsFixes available
redhat/fastify-reply-from<4.0.2
4.0.2
Fastify-reply-from Project Fastify-reply-from Node.js<4.0.2

Event History

Feb 23, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 2, 2021
CVE Published
via MITRE·03:35 AM
Data Sourced
via MITRE·03:35 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-21321?

CVE-2021-21321 is rated as a high severity vulnerability due to its potential to expose sensitive files and directories.

2

How do I fix CVE-2021-21321?

To fix CVE-2021-21321, upgrade the fastify-reply-from package to version 4.0.2 or later.

3

What software is affected by CVE-2021-21321?

CVE-2021-21321 affects the fastify-reply-from package specifically versions prior to 4.0.2.

4

What impact does CVE-2021-21321 have on my system?

CVE-2021-21321 allows attackers to exploit improperly handled URL prefixes to access restricted directories.

5

Is CVE-2021-21321 exploitable remotely?

Yes, CVE-2021-21321 can be exploited remotely using specially crafted URLs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203