CVE-2022-21221
HIGH 7.5CVSS 3.1Path traversal in github.com/valyala/fasthttp
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.
- Published
- 17 Mar 2022
- Last modified
- 8 Jul 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-fx95-883v-4q4hGO-2022-0355SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866
- Sources
- NVDJSONOSV GHSA-fx95-883v-4q4hJSONOSV GO-2022-0355JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fasthttp_project | fasthttpcpe:2.3:a:fasthttp_project:fasthttp:*:*:*:*:*:*:*:* |
< 1.34.0 | 1.34.0 |
| OSV | Go | github.com/valyala/fasthttp | < 1.34.0 | 1.34.0 |
References
- https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8 · Patch, Third Party Advisory, WEB
- https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/valyala/fasthttp/issues/1226 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB
- https://github.com/valyala/fasthttp/releases/tag/v1.34.0 · Release Notes, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866 · Exploit, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21221 · ADVISORY
- https://github.com/valyala/fasthttp · PACKAGE
- https://pkg.go.dev/vuln/GO-2022-0355 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 17 Mar 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 27 Jul 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 18 Mar 2022)