{"id":"CVE-2026-114104","aliases":["CVE-2026-114104","GHSA-p634-w6r4-rjp2"],"related":[],"kind":"vulnerability","state":"published","title":"adm-zip before 0.6.1 Duplicate ZIP Entry Name Validation Bypass","summary":"adm-zip before 0.6.1 contains an inconsistent entry resolution vulnerability that allows attackers to bypass content validation by supplying ZIP archives with duplicate entry names. Attackers can craft archives where getEntry() returns the last duplicate while extractAllTo() writes the first, causing unvalidated bytes to be written to disk.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"adm-zip before 0.6.1 contains an inconsistent entry resolution vulnerability that allows attackers to bypass content validation by supplying ZIP archives with duplicate entry names. Attackers can craft archives where getEntry() returns the last duplicate while extractAllTo() writes the first, causing unvalidated bytes to be written to disk.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA ZIP file can contain two entries with the identical name. adm-zip keeps both in its internal entry list, but its name-lookup table only retains the last one written. `getEntry(name)` and `extractAllTo()` walk these two different internal structures, so they can each resolve a duplicate name to a *different* entry. An application that validates a named entry's contents via `getEntry()` before trusting an archive, then extracts the whole archive, can end up approving one file's content while a different file's bytes are what actually land on disk under that name.\n\n### Details\n- `zipFile.js:58-83` retains both entries in `entryList` but overwrites `entryTable[name]` with only the last one written.\n- `adm-zip.js:83-95,658-663` uses `entryTable` for `getEntry()` lookups — returns the *last* duplicate.\n- `adm-zip.js:769-914` iterates `entryList` for extraction — writes the *first* duplicate (sync, default overwrite policy).\n\n\n### PoC\n```js\nconst AdmZip = require('adm-zip');\nconst z = new AdmZip({ noSort: true });\nz.addFile('a.txt', Buffer.from('FIRST'));\nz.addFile('b.txt', Buffer.from('SECOND'));\nconst raw = Buffer.from(z.toBuffer());\n// rename the a.txt entry to b.txt directly in the raw bytes\nfor (let at = raw.indexOf('a.txt'); at >= 0; at = raw.indexOf('a.txt', at + 5)) {\n  raw.write('b.txt', at);\n}\nconst parsed = new AdmZip(raw, { noSort: true });\nconst validated = parsed.getEntry('b.txt').getData().toString();\nparsed.extractAllTo(outDir, false);\n// validated === \"SECOND\", but the file written to disk === \"FIRST\"\n```\n\nReproduced on the pinned commit (`2b4d84087d45344643e0183756e19191d52815cc`)\n\n### Impact\nAn application that checks a named entry's content before trusting an untrusted ZIP, then extracts it, can be made to approve different bytes than what actually gets written to disk — the classic check/use split that this kind of validate-then-extract pattern relies on.","format":"markdown","source":"ghsa"}],"published":"2026-09-29T23:11:01.000Z","modified":"2026-10-28T17:17:47.730Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-436","CWE-696"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.6.1","status":"affected"},{"type":"semver","version":"0.6.1","status":"unaffected"}],"vendor":"cthackers","product":"adm-zip","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.6.1"}],"ecosystem":"npm","package":"adm-zip","purl":"pkg:npm/adm-zip","source":"ghsa"}],"references":[{"url":"https://github.com/cthackers/adm-zip/security/advisories/GHSA-p634-w6r4-rjp2","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/adm-zip-before-0.6.1-duplicate-zip-entry-name-validation-bypass","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/cthackers/adm-zip/commit/05101d47b3b983b705cc3e66fc34366118ba7b99","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cthackers/adm-zip","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/cthackers/adm-zip/releases/tag/v0.6.1","tags":["web"],"sources":["ghsa"]}],"credits":["zikk090"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-10-28T16:14:10.737Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114104","url":"https://www.cve.org/CVERecord?id=CVE-2026-114104","licence":"CVE Terms of Use","modified":"2026-10-28T16:14:55.229Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p634-w6r4-rjp2","url":"https://github.com/advisories/GHSA-p634-w6r4-rjp2","licence":"CC-BY-4.0","modified":"2026-10-21T10:57:22.783Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114104","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114104","licence":"Public domain","modified":"2026-10-28T17:17:47.730Z"}],"updatedAt":"2026-11-25T22:59:46.547Z","epss":{"score":0.00331,"percentile":0.28272,"date":"2026-12-01T12:00:22.000Z"}}