Email me

Rust advisories / decompress

Vulnerability HighRUSTSEC-2026-0328 · decompress

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

Short answerA security vulnerability in the decompress crate: `decompress`: tar-family extractors write archive entries without a path-traversal check (tar-slip). High severity (CVSS 7.1). No fixed version: replace the crate or remove the affected code path.

Cratedecompress
TypeVulnerability (code-execution)
Affected versionsEvery version.
Fixed innone
SeverityHigh, CVSS 7.1
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Published2026-09-19
Last changed2026-10-03
Also known asnone
Affected functionsdecompress::decompress

What to do

  1. Find who pulls it in: cargo tree -i decompress.
  2. Avoid the affected API (decompress::decompress), or replace the crate.

Details from the advisory

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):

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.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ