Sceawere
Vulnerability Detail
CVE-2026-76845UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
adm-zip Arbitrary File Overwrite Vulnerability
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 6.5
- Creation Date
- 4h ago
- Vendor
- cthackers
- Product
- adm-zip
- Attack Type
- Improper Link Resolution Before File Access ('Link Following')
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
adm-zip 0.5.9 through 0.6.0 follows symbolic links at the extraction destination. Utils.sanitize in util/utils.js enforces containment by comparing only the string form of an archive entry name against the resolved extraction root, and Utils.writeFileTo opens the computed destination with fs.openSync(path, "w", 0o666), which resolves symbolic links and carries neither O_NOFOLLOW nor a pre-write fs.lstatSync check. When a path component at the destination already exists as a symbolic link pointing outside the extraction root, extractAllTo, extractAllToAsync and extractEntryTo write the entry contents through that link and then chmod its target, placing attacker-controlled content in a file outside the root without any traversal sequence appearing in the archive. Reaching the write requires overwrite to be enabled, because the preceding fs.existsSync check also resolves the link and otherwise declines. An attacker able to create a symbolic link inside a shared, reused or predictable extraction directory, such as a temporary directory or a continuous integration workspace, can overwrite any file the extracting process is permitted to write.
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-24T14:17:02.423Z",
"pubdate": "2026-08-24T14:17:02.423Z",
"executiveSummary": "An arbitrary file overwrite vulnerability exists in adm-zip versions 0.5.9 through 0.6.0. The vulnerability stems from improper handling of symbolic links at the extraction destination during archive processing. An attacker capable of creating a symbolic link inside a shared, reused, or predictable extraction directory can cause the extracting process to overwrite arbitrary files outside the extraction root that the process has permission to write. The impact includes unauthorized modification or replacement of sensitive files, potentially leading to privilege escalation, data corruption, or system compromise. Successful exploitation requires the overwrite configuration to be enabled and an attacker-controlled symbolic link to exist at the destination pointing outside the intended containment directory. No traversal sequences are required within the archive entry names to achieve this behavior.",
"technicalDetails": "The vulnerability resides in the adm-zip library, specifically within the util/utils.js component and extraction functions including extractAllTo, extractAllToAsync, and extractEntryTo. The root cause is twofold: inadequate path containment enforcement and the unsafe opening of destination files that resolve symbolic links without proper validation. Specifically, Utils.sanitize attempts to enforce containment by solely comparing the string form of an archive entry name against the resolved extraction root. Meanwhile, Utils.writeFileTo opens the computed destination path using fs.openSync(path, \"w\", 0o666). This file open operation resolves symbolic links and lacks the O_NOFOLLOW flag as well as a pre-write fs.lstatSync check to detect pre-existing symlinks.\nWhen a path component at the extraction destination already exists as a symbolic link pointing to an external target outside the extraction root, standard archive extraction methods will traverse this link. Provided that overwrite is enabled—which bypasses the preceding fs.existsSync check that would otherwise decline the operation due to link resolution—the extraction routines write the entry contents directly through the symbolic link. Subsequent operations apply a chmod call to the target of the link. As a result, attacker-controlled content is successfully written to a file external to the intended extraction root without relying on directory traversal sequences inside the archive headers.\nThe attack flow requires an attacker to pre-create a malicious symbolic link within a predictable, shared, or reused extraction directory, such as a temporary directory or a continuous integration workspace. When the victim process executes an extraction method with overwrite enabled targeting this directory, adm-zip traverses the malicious symlink during the file writing phase. The payload behavior consists of writing arbitrary archive entry contents into the pointed external file path and altering its file permissions via chmod. The post-exploitation impact allows an adversary to overwrite any file accessible by the permissions of the running extracting process."
}