Skip to content
Heist/ feed
Back to feed
Medium

Directory Traversal

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-21221
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 15:53 UTC · Revision 1

Source evidence

Directory Traversal

core-osv · Original source

Published 17 Mar 2022, 11:21 UTC

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.

osv:CVE-2022-21221
Complete source record
{
  "id": "d862da93bf97d56f63f07361f5757f92365f2b56e290790dc77bc93ff6aa27b4",
  "url": "https://osv.dev/vulnerability/CVE-2022-21221",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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.",
    "evidence": "osv:CVE-2022-21221",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-21221",
      "aliases": [
        "CVE-2022-21221",
        "GHSA-fx95-883v-4q4h",
        "GO-2022-0355",
        "SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/valyala/fasthttp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "59f94a3f7137d0ad215bd262df7082d1e632a1f7"
                },
                {
                  "fixed": "15262ecf3c602364639d465daba1e7f3604d00e8"
                },
                {
                  "fixed": "6b5bc7bb304975147b4af68df54ac214ed2554c1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:fasthttp_project:fasthttp:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.34.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "15262ecf3c602364639d465daba1e7f3604d00e8"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6b5bc7bb304975147b4af68df54ac214ed2554c1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "59f94a3f7137d0ad215bd262df7082d1e632a1f7"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.34.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.33.0",
            "v1.32.0",
            "v1.31.0",
            "v1.30.0",
            "v1.29.0",
            "v1.28.0",
            "v1.27.0",
            "v1.26.0",
            "v1.25.0",
            "v1.24.0",
            "v1.23.0",
            "v1.22.0",
            "v1.21.0",
            "v1.20.0",
            "v1.19.0",
            "v1.18.0",
            "v1.17.0",
            "v1.16.0",
            "v1.15.1",
            "v1.15.0",
            "v1.14.0",
            "v1.13.1",
            "v1.13.0",
            "v20180529",
            "v1.12.0",
            "v1.11.0",
            "v1.10.0",
            "v1.9.0",
            "v1.8.0",
            "v1.7.1",
            "v1.7.0",
            "v1.6.0",
            "v1.5.0",
            "v1.4.0",
            "v1.3.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.0",
            "v20160617",
            "v20160419",
            "v20160316"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21221.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.469839605Z",
      "provider": "osv",
      "references": [
        "https://github.com/valyala/fasthttp/releases/tag/v1.34.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21221.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-21221",
        "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVALYALAFASTHTTP-2407866",
        "https://github.com/valyala/fasthttp/issues/1226",
        "https://github.com/valyala/fasthttp/commit/15262ecf3c602364639d465daba1e7f3604d00e8",
        "https://github.com/valyala/fasthttp/commit/6b5bc7bb304975147b4af68df54ac214ed2554c1"
      ],
      "provider_metadata": {
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21221.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-21221",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497034,
  "published_at": "2022-03-17T11:21:09.487+00:00"
}