Sceawere
Vulnerability Detail
CVE-2026-70622UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
Symlink Escape Vulnerability in tar-rs
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 6.5
- Creation Date
- 5h ago
- Vendor
- composefs
- Product
- tar-rs
- Attack Type
- Improper Link Resolution Before File Access ('Link Following')
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
tar-rs versions 0.4.11 through 0.4.46 contain a symlink escape vulnerability in the Builder::append_dir_all() function that allows attackers to read files outside the intended source root directory by planting symlinks in an attacker-controlled directory. When a privileged process archives an untrusted directory, the function follows symlinks without verifying that resolved targets remain within the source root, causing out-of-bounds files to be included in the archive as regular files and disclosed to the attacker.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "6.5",
"pubDate": "2026-08-10T18:18:50.610Z",
"pubdate": "2026-08-10T18:18:50.610Z",
"executiveSummary": "A symlink escape vulnerability exists in the tar-rs crate, specifically within the Builder::append_dir_all() function across versions 0.4.11 through 0.4.46. This flaw allows an attacker capable of planting symbolic links within an attacker-controlled directory to bypass path containment boundaries and cause privileged archival processes to traverse and include arbitrary files located outside the intended source root directory.\nThe primary impact of this vulnerability is unauthorized information disclosure. When a privileged process executes the vulnerable function on an untrusted directory containing maliciously crafted symlinks, the resulting archive incorporates the targeted out-of-bounds files as regular files. Consequently, sensitive system files or private data accessible to the privileged archiver are inadvertently leaked into the generated archive.\nThe vulnerability affects systems utilizing the specified versions of the tar-rs library to process untrusted directory inputs. Exploitation requires the attacker to have write access to the source directory structure to plant malicious symbolic links before the archival operation takes place. No network exposure or authentication is inherently required if the vulnerable application processes local untrusted file system boundaries, but the severity escalates significantly when executed with elevated privileges.",
"technicalDetails": "The root cause of the vulnerability resides in the insufficient boundary validation logic within the Builder::append_dir_all() function of the affected tar-rs library versions (0.4.11 through 0.4.46). During the recursive traversal of directories slated for inclusion in an archive, the function fails to adequately verify whether the targets resolved from encountered symbolic links remain securely confined within the designated source root directory.\nThe vulnerable component is the directory traversal and file appending mechanism implemented in Builder::append_dir_all(). Because the function resolves and follows symbolic links without performing rigorous canonical path containment checks, it processes symlink targets that point to locations external to the source tree. As a result, when the archiving process reads the data pointed to by the symlink, it treats the external target as a valid component within the source directory.\nThe attack flow proceeds in a sequential manner. First, an attacker establishes an attacker-controlled directory that will subsequently be processed by a target application utilizing tar-rs. Second, the attacker plants one or more symbolic links within this directory structure, configuring them to point toward sensitive system files or restricted locations outside the source root. Third, a privileged process or user invokes Builder::append_dir_all() on the untrusted directory. Fourth, as the function recursively traverses the directory, it encounters the malicious symlinks and follows them without boundary verification. Finally, the contents of the out-of-bounds files are read and written into the archive as regular files, thereby disclosing sensitive data to the attacker upon extraction or inspection of the archive.\nRegarding exploitation requirements, the attacker needs write access to the source directory to plant the symlinks, while the archiving process itself requires sufficient filesystem privileges to read the targeted out-of-bounds files. The vulnerability does not depend on network exposure, as it operates entirely at the local filesystem and library execution level."
}