CVE-2022-21221 json
Directory Traversal
published 2022-03-17 4 y ago modified 2026-07-08 4 mo ago also GHSA-fx95-883v-4q4h , GO-2022-0355 , EUVD-2022-1419
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.5%
- EPSS 2.5% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/valyala/fasthttp 1.34.0
- n/a github.com/valyala/fasthttp 1.34.0
Exploit prediction
2.50% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- snyk.io https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/valyala/fasthttp/issues/1226 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/valyala/fasthttp | <1.34.0 |
1.34.0 |
Affected products
- n/a github.com/valyala/fasthttp
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1
web, patch, third-party-advisory
-
github.com
/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8
web, patch, third-party-advisory
-
snyk.io
/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866
web, exploit, patch, third-party-advisory
-
github.com
/valyala/fasthttp/issues/1226
web, exploit, issue-tracking, patch, third-party-advisory
-
github.com
/valyala/fasthttp/releases/tag/v1.34.0
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-21221
advisory
-
github.com
/valyala/fasthttp
package
-
pkg.go.dev
/vuln/GO-2022-0355
web
Sources
- CVE List CVE-2022-21221
- GitHub Advisory GHSA-fx95-883v-4q4h
- NVD CVE-2022-21221
- OSV GO-2022-0355
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.