`sn-releases`: `extract_release_archive` writes archive entries without a path-traversal check (zip-slip)
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The `sn-releases` Rust crate, specifically its release archive extraction function, is affected. An attacker who supplies a malicious release archive can cause files and directories to be written outside the intended destination folder, which could overwrite sensitive files or plant code on the system running the extraction.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
`SafeReleaseRepoActions::extract_release_archive` builds each output path from the raw archive entry name and writes to it with no traversal check, so a malicious release archive can create directories and write files outside the destination directory, a "zip-slip" / path traversal (CWE-22 / CWE-23). In `src/lib.rs` (`extract_release_archive`, zip branch): ```rust let mut file = archive.by_index(i)?; let out_path = dest_dir_path.join(file.name()); // file.name() is the raw entry name if file.name().ends_with('/') { std::fs::create_dir_all(&out_path)?; // no `..` check } else { let mut outfile = std::fs::File::create(&out_path)?; // writes outside dest std::io::copy(&mut file, &mut outfile)?; } ``` The crate is unmaintained (latest release 0.3.1, 2024-10-22) and no fixed version is available.
Timeline
- Advisory published
- Record last updated
- First seen by cve.now
Affected versions
- sn-releasescrates.io
From 0.0.0-0