{
  "id": 21393553,
  "title": "sevenz-rust2 Extracted 7z Entries Without Containing Paths",
  "url": "https://urgent.news/2026/11/23/sevenz-rust2-extracted-7z-entries-without-containing-paths",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-23T12:22:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/onaeiuspkz/sevenz-rust2-extracted-7z-entries-without-containing-paths-3fe5"
  },
  "original_language": "en",
  "account": "CVE-2026-61725 impacts the Rust library sevenz-rust2 prior to version 0.21.1. The vulnerability stems from decompression routines that form output paths using `dest.join(entry.name())` without proper safeguards. This flaw enables attackers to craft malicious 7z entries that write files outside the intended destination, a problem akin to Zip Slip exploits. The issue arises because applications that process 7z archives, backups, or bundles may treat the library as a mere file parser, neglecting the write operation happening during extraction.\n\nWhen the application receives a filename containing parent directory components or an absolute path, if this name is directly joined into a path without additional checks, the resulting path may breach the designated destination. Multiple decompression helpers, including the file and password variants, are susceptible to this flaw. Simply updating one usage of the library does not suffice; any other utility employing the same vulnerable path construction remains at risk.\n\nThe ramifications extend beyond arbitrary file writes. Successful exploitation can lead to code execution via several pathways: overwriting startup scripts, libraries loaded by the application, configuration files accessed by privileged processes, or scheduled tasks. The severity of the breach correlates with the privileges held by the service executing the extraction.\n\nTo mitigate the risk, users should upgrade sevenz-rust2 to version 0.21.1 or newer, ensuring all binaries linked to the library are rebuilt. Implementing a pre-extraction validation step that disallows absolute paths, parent directory components, empty names, and platform-specific prefixes can prevent exploitation. Verifying the final path remains within the extraction root by resolving it and confirming its location below the root is crucial. Avoid following symbolic links within the archive and limit file and directory permissions to those necessary post-extraction. Running the extraction in a disposable worker environment with a private temporary directory, no cloud credentials, and a read-only base image further reduces the attack surface. Additionally, limiting resource allocation for both the archive and the output tree can contain potential damage.\n\nHistorical investigation of artifact and upload histories for .7z files processed by affected builds, along with reviewing write activities around startup directories, shared libraries, cron entries, and service configurations, can aid in identifying potential exposures. Hash comparisons may reveal known payloads, but crafted archives might leave only unexpected files in trusted paths. If extraction ran with elevated privileges, collecting process creation, file integrity, and package manager logs is advisable before remediation.\n\nReplacing the vulnerable library addresses the immediate vulnerability but does not guarantee the previous archive was safe. Rigorous testing of the new version with entries containing malicious path patterns, such as `..`, absolute paths, or symlinks pointing outside the root, should confirm that the operation fails before any file creation. Additionally, evaluating the application's path policy is essential, as a safe library call can still be compromised by underlying unsafe code.",
  "summary": "sevenz-rust2 Extracted 7z Entries Without Containing Paths A Rust library can still inherit classic archive bugs. CVE-2026-61725 affects sevenz-rust2 before 0.21.1. The advisory says the decompression path built each output as dest.join(entry.name()) without a traversal guard, allowing a crafted 7z entry to write outside the selected destination. That pattern is familiar from Zip Slip, but the…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}