CVE-2021-21322: Prefix escape
10
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.68505%
CWE
Published
3/3/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
fastify-http-proxy | npm | < 4.3.1 | 4.3.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key issues: 1) createWebSocketUrl
's improper path construction that didn't validate
the request path against the configured prefix, allowing path manipulation. 2) setupWebSocketProxy
's missing initial prefix check for WebSocket connections. The commit 02d9b43 adds both the prefix validation
check in setupWebSocketProxy
and fixes the path rewriting logic in createWebSocketUrl
, confirming these were the vulnerable components. The CWE-20 mapping further supports the input validation
failure context.