Vulnerability · Published Mar 17, 2022 · Assigned by snyk
CVE-2022-21221Directory Traversal
Medium 5.9
In plain English
A medium-severity security flaw in github.com/valyala/fasthttp. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.5% (higher than 85% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)2.5%top 15.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/valyala/fasthttp | 1.34.0 | GHSA-fx95-883v-4q4h |
| Go | github.com/valyala/fasthttp | 1.34.0 | GO-2022-0355 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | github.com/valyala/fasthttp | unspecified – before 1.34.0 |
References
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866 x_refsource_MISC
- https://github.com/valyala/fasthttp/issues/1226 x_refsource_MISC
- https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1 x_refsource_MISC
- https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8 x_refsource_MISC
- https://github.com/valyala/fasthttp/releases/tag/v1.34.0 x_refsource_MISC