<?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, 01 Oct 2026 12:34:23 +0000</lastBuildDate>
    <item>
      <title>GHSA-34x7-hfp2-rc4v — node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal</title>
      <link>https://db.gcve.eu/vuln/ghsa-34x7-hfp2-rc4v</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: tar&lt;/p&gt;
&lt;p&gt;### Summary
node-tar contains a vulnerability where the security check for hardlink entries uses different path resolution semantics than the actual hardlink creation logic. This mismatch allows an attacker to craft a malicious TAR archive that bypasses path traversal protections and creates hardlinks to arbitrary files outside the extraction directory.&lt;/p&gt;
&lt;p&gt;### Details
The vulnerability exists in `lib/unpack.js`. When extracting a hardlink, two functions handle the linkpath differently:&lt;/p&gt;
&lt;p&gt;**Security check in `[STRIPABSOLUTEPATH]`:**
```javascript
const entryDir = path.posix.dirname(entry.path);
const resolved = path.posix.normalize(path.posix.join(entryDir, linkpath));
if (resolved.startsWith(&amp;#39;../&amp;#39;)) { /* block */ }
```&lt;/p&gt;
&lt;p&gt;**Hardlink creation in `[HARDLINK]`:**
```javascript
const linkpath = path.resolve(this.cwd, entry.linkpath);
fs.linkSync(linkpath, dest);
```&lt;/p&gt;
&lt;p&gt;**Example:** An application extracts a TAR using `tar.extract({ cwd: &amp;#39;/var/app/uploads/&amp;#39; })`. The TAR contains entry `a/b/c/d/x` as a hardlink to `../../../../etc/passwd`.&lt;/p&gt;
&lt;p&gt;- **Security check** resolves the linkpath relative to the entry&amp;#39;s parent directory: `a/b/c/d/ + ../../../../etc/passwd` = `etc/passwd`. No `../` prefix, so it **passes**.&lt;/p&gt;
&lt;p&gt;- **Hardlink creation** resolves the linkpath relative to the extraction directory (`this.cwd`): `/var/app/uploads/ + ../../../../etc/passwd` = `/etc/passwd`. This **escapes** to the system&amp;#39;s `/etc/passwd`.&lt;/p&gt;
&lt;p&gt;The security check and hardlink creation use different starting points (en…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: tar&lt;/p&gt;
&lt;p&gt;### Summary
node-tar contains a vulnerability where the security check for hardlink entries uses different path resolution semantics than the actual hardlink creation logic. This mismatch allows an attacker to craft a malicious TAR archive that bypasses path traversal protections and creates hardlinks to arbitrary files outside the extraction directory.&lt;/p&gt;
&lt;p&gt;### Details
The vulnerability exists in `lib/unpack.js`. When extracting a hardlink, two functions handle the linkpath differently:&lt;/p&gt;
&lt;p&gt;**Security check in `[STRIPABSOLUTEPATH]`:**
```javascript
const entryDir = path.posix.dirname(entry.path);
const resolved = path.posix.normalize(path.posix.join(entryDir, linkpath));
if (resolved.startsWith(&amp;#39;../&amp;#39;)) { /* block */ }
```&lt;/p&gt;
&lt;p&gt;**Hardlink creation in `[HARDLINK]`:**
```javascript
const linkpath = path.resolve(this.cwd, entry.linkpath);
fs.linkSync(linkpath, dest);
```&lt;/p&gt;
&lt;p&gt;**Example:** An application extracts a TAR using `tar.extract({ cwd: &amp;#39;/var/app/uploads/&amp;#39; })`. The TAR contains entry `a/b/c/d/x` as a hardlink to `../../../../etc/passwd`.&lt;/p&gt;
&lt;p&gt;- **Security check** resolves the linkpath relative to the entry&amp;#39;s parent directory: `a/b/c/d/ + ../../../../etc/passwd` = `etc/passwd`. No `../` prefix, so it **passes**.&lt;/p&gt;
&lt;p&gt;- **Hardlink creation** resolves the linkpath relative to the extraction directory (`this.cwd`): `/var/app/uploads/ + ../../../../etc/passwd` = `/etc/passwd`. This **escapes** to the system&amp;#39;s `/etc/passwd`.&lt;/p&gt;
&lt;p&gt;The security check and hardlink creation use different starting points (en…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-34x7-hfp2-rc4v</guid>
    </item>
  </channel>
</rss>
