Vulnerability Details : CVE-2022-21221
Potential exploit
The package github.com/valyala/fasthttp before 1.34.0 are vulnerable to Directory Traversal via the ServeFile function, due to improper sanitization. It is possible to be exploited by using a backslash %5c character in the path. **Note:** This security issue impacts Windows users only.
Vulnerability category: Directory traversal
Products affected by CVE-2022-21221
- cpe:2.3:a:fasthttp_project:fasthttp:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-21221
0.85%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 74 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-21221
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:P/I:N/A:N |
10.0
|
2.9
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
3.9
|
3.6
|
NIST | |
5.9
|
MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
2.2
|
3.6
|
Snyk |
CWE ids for CVE-2022-21221
-
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.Assigned by: nvd@nist.gov (Primary)
References for CVE-2022-21221
-
https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1
Add windows support to normalizePath · valyala/fasthttp@6b5bc7b · GitHubPatch;Third Party Advisory
-
https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8
Warn about unsafe ServeFile usage (#1228) · valyala/fasthttp@15262ec · GitHubPatch;Third Party Advisory
-
https://github.com/valyala/fasthttp/issues/1226
Path Traversal Attacks · Issue #1226 · valyala/fasthttp · GitHubExploit;Issue Tracking;Patch;Third Party Advisory
-
https://github.com/valyala/fasthttp/releases/tag/v1.34.0
Release v1.34.0 · valyala/fasthttp · GitHubRelease Notes;Third Party Advisory
-
https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866
Directory Traversal in github.com/valyala/fasthttp | CVE-2022-21221 | SnykExploit;Patch;Third Party Advisory
Jump to