GHSA-8v4j-7jgf-5rg9: Warp Path Traversal Vulnerability

HIGH
CWE-22
Published
Advisory Summary

GHSA-8v4j-7jgf-5rg9 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Warp libraries in the crates.io ecosystem. The issue involves warp vulnerable to path traversal via improper validation of windows paths. Remediation is available by upgrading affected packages to version 0.3.3.

GHSA-8v4j-7jgf-5rg9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8v4j-7jgf-5rg9
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Warp
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-8v4j-7jgf-5rg9

To remediate this vulnerability, upgrade all affected Warp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

warp fixed: 0.3.3
Upgrade warp to 0.3.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for warp

How to Check if You Are Affected

To determine whether your application is affected by GHSA-8v4j-7jgf-5rg9, inspect your project dependencies for Warp:

inspect dependencies for warp

Analyze the terminal output to locate any version of Warp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Warp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Path resolution in `warp::filters::fs::dir` didn't correctly validate Windows paths meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem. This only impacts Windows. Linux and other unix likes are not impacted by this.

GHSA-8v4j-7jgf-5rg9 Affected Warp Versions

1 component(s)
Fixed Versions:
0.3.3
Product / Package Ecosystem Affected Versions Fixed Version
warp
crates.io
< 0.3.3
0.3.3

References

Frequently Asked Questions

What is GHSA-8v4j-7jgf-5rg9?
GHSA-8v4j-7jgf-5rg9 is a security vulnerability in Warp involving Warp vulnerable to Path Traversal via Improper validation of Windows paths under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Warp versions are affected?
Affected versions include releases prior to 0.3.3 across affected packages: warp.
What version fixes GHSA-8v4j-7jgf-5rg9?
Upgrading to 0.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is warp affected?
Yes, warp is affected in releases prior to 0.3.3. Upgrade your dependency to 0.3.3 or later.
What CWE is associated with GHSA-8v4j-7jgf-5rg9?
GHSA-8v4j-7jgf-5rg9 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check crates.io dependencies for GHSA-8v4j-7jgf-5rg9?
Run the dependency tree command: 'inspect dependencies for warp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8v4j-7jgf-5rg9",
  "modified" : "2023-03-31T00:06:08Z",
  "published" : "2023-01-31T23:33:47Z",
  "aliases" : [ ],
  "summary" : "Warp vulnerable to Path Traversal via Improper validation of Windows paths",
  "details" : "Path resolution in `warp::filters::fs::dir` didn't correctly validate Windows paths meaning paths like `/foo/bar/c:/windows/web/screen/img101.png` would be allowed and respond with the contents of `c:/windows/web/screen/img101.png`. Thus users could potentially read files anywhere on the filesystem.\n\nThis only impacts Windows. Linux and other unix likes are not impacted by this.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "warp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/seanmonstar/warp/issues/937"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/seanmonstar/warp/pull/997"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/seanmonstar/warp/commit/0074a0a3e98786509259bfe3821d3b3f094257aa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/seanmonstar/warp"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0082.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-31T23:33:47Z",
    "nvd_published_at" : null
  }
}