{"id":"CVE-2022-21221","aliases":["CVE-2022-21221","GHSA-fx95-883v-4q4h","GO-2022-0355","SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866"],"related":[],"kind":"vulnerability","state":"published","title":"Directory Traversal","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The fasthttp.FS request handler is vulnerable to directory traversal attacks on Windows systems, and can serve files from outside the provided root directory.\n\nURL path normalization does not handle Windows path separators (backslashes), permitting an attacker to construct requests with relative paths.","format":"markdown","source":"go"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-03-17T11:21:09.487Z","modified":"2026-07-08T06:49:38.033Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"1.34.0","status":"affected"}],"product":"github.com/valyala/fasthttp","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.34.0"}],"ecosystem":"Go","package":"github.com/valyala/fasthttp","purl":"pkg:golang/github.com/valyala/fasthttp","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.34.0"}],"ecosystem":"Go","package":"github.com/valyala/fasthttp","purl":"pkg:golang/github.com/valyala/fasthttp","source":"go"},{"ranges":[{"status":"affected","fixed":"1.34.0"}],"vendor":"fasthttp_project","product":"fasthttp","cpe":"cpe:2.3:a:fasthttp_project:fasthttp:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/valyala/fasthttp/issues/1226","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/valyala/fasthttp/releases/tag/v1.34.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21221","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/valyala/fasthttp","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0355","tags":["web"],"sources":["ghsa"]}],"credits":["egovorukhin"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-21221","url":"https://www.cve.org/CVERecord?id=CVE-2022-21221","licence":"CVE Terms of Use","modified":"2024-09-16T18:34:58.514Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fx95-883v-4q4h","url":"https://github.com/advisories/GHSA-fx95-883v-4q4h","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:38.033Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0355","url":"https://pkg.go.dev/vuln/GO-2022-0355","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:38.033Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-21221","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21221","licence":"Public domain","modified":"2026-06-17T04:25:46.757Z"}],"updatedAt":"2026-11-25T22:58:10.150Z","epss":{"score":0.02496,"percentile":0.85125,"date":"2026-12-01T12:00:22.000Z"}}