# CVE-2022-21221: Directory Traversal

- Severity: Medium 5.9 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.50%, higher than 85% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-03-17T11:21:09.487Z
- Modified: 2026-07-08T06:49:38.033Z
- Also known as: GHSA-fx95-883v-4q4h, GO-2022-0355, SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866
- Weaknesses: CWE-22
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- github.com/valyala/fasthttp: from unspecified before 1.34.0
- github.com/valyala/fasthttp (Go): before 1.34.0
- fasthttp_project fasthttp: before 1.34.0

## Every score

- snyk: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## 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

- CVE List: [CVE-2022-21221](https://www.cve.org/CVERecord?id=CVE-2022-21221), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-fx95-883v-4q4h](https://github.com/advisories/GHSA-fx95-883v-4q4h), CC-BY-4.0, modified 2026-07-08
- Go Vulnerability Database: [GO-2022-0355](https://pkg.go.dev/vuln/GO-2022-0355), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-21221](https://nvd.nist.gov/vuln/detail/CVE-2022-21221), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21221 · Whole record: https://cve.day/CVE-2022-21221.json · Rebuilt by cve.day 2026-11-25T22:58:10.150Z
