Skip to content
Heist/ feed
High

`decompress`: tar-family extractors write archive entries without a path-traversal check (tar-slip)

Type: advisorySource: OSV1 source record

The tar-family extractors in `decompress` (`.tar`, `.tar.gz`, `.tar.xz`, `.tar.bz2`, `.tar.zst`) build each output path from the **raw archive entry path** and write to it with no traversal check, so a malicious archive can write files **outside** the destination directory, a "tar-slip" / zip-slip path traversal (CWE-22 / CWE-23). In `src/decompressors/tar_common.rs` (`tar_extract`): ```rust let filepath = entry.path()?; // raw entry path let filepath = filepath.components().skip(opts.strip).collect::(); // strips leading components only — keeps `..` let outpath = to.join(filepath); // ... let mut outfile = fs::File::create(&outpath)?; // writes anywhere ``` `.components().skip(opts.strip)` removes a fixed number of *leading* path components but leaves interior `..` components intact so an entry named e.g. `../../../../home//.bashrc`, or an absolute path, resolves **outside** `to`. This affects all platforms.

Announced Group revision 1
Original source ↗

RUSTSEC-2026-0328

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:RUSTSEC-2026-0328

decompress

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0.0.0-0"
          }
        ]
      }
    ],
    "package": {
      "name": "decompress",
      "purl": "pkg:cargo/decompress",
      "ecosystem": "crates.io"
    },
    "database_specific": {
      "cvss": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H",
      "source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0328.json",
      "categories": [
        "code-execution"
      ],
      "informational": null
    },
    "ecosystem_specific": {
      "affects": {
        "os": [],
        "arch": [],
        "functions": [
          "decompress::decompress"
        ]
      },
      "affected_functions": null
    }
  }
]

Publisher severity

high

Source reference: /severity/0/score

Event
#72949 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement