Skip to content
Fencer Vulns
high 7.1

RUSTSEC-2026-0328 json

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

published 2026-09-19 50 d ago modified 2026-10-03 36 d ago

cvss
7.1
version 3.1, OSV
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

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::<PathBuf>(); // 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/<user>/.bashrc`, or an absolute path, resolves **outside** `to`. This affects all platforms.

CVSS scores

assigned by version score vector
OSV 3.1 7.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H

Affected packages

ecosystem package affected fixed in
crates.io decompress
>=0.0.0-0
no fix listed

References

Sources

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.