5.9medium
Directory Traversal
- Severity
- 5.9medium CVSS:3.1 by snyk
- Exploit likelihood
- 2.50% (higher than 85% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-fx95-883v-4q4hGO-2022-0355SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866
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
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/valyala/fasthttp | from unspecified before 1.34.0 | CVE List |
| github.com/valyala/fasthttp (Go) | before 1.34.0 | GitHub Advisory Database, Go Vulnerability Database |
| fasthttp_project fasthttp | before 1.34.0 | NVD |
All scores
| snyk | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
The package github.com/valyala/fasthttp before 1.34.0 is 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.
Go Vulnerability Database
The fasthttp.FS request handler is vulnerable to directory traversal attacks on Windows systems, and can serve files from outside the provided root directory.
URL path normalization does not handle Windows path separators (backslashes), permitting an attacker to construct requests with relative paths.
NVD (es)
El paquete github.com/valyala/fasthttp versiones anteriores a 1.34.0, es vulnerable a un Salto de Directorio por medio de la función ServeFile, debido a un saneo inapropiado. Puede explotarse usando un carácter de barra invertida %5c en la ruta. **Nota:** Este problema de seguridad afecta únicamente a usuarios de Windows
References
| https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866 | exploit, patch, third-party-advisory, web | |
| https://github.com/valyala/fasthttp/issues/1226 | exploit, issue-tracking, patch, third-party-advisory, web | |
| https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1 | fix, patch, third-party-advisory, web | |
| https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8 | patch, third-party-advisory, web | |
| https://github.com/valyala/fasthttp/releases/tag/v1.34.0 | release-notes, 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 | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-21221 changed 2024-09-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fx95-883v-4q4h changed 2026-07-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0355 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2022-21221 changed 2026-06-17 | Public domain |