node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.2, a small crafted archive can exhaust memory or CPU through several path bookkeeping paths. Asynchronous PathReservations performs excessive work for unbounded linkpath depth and long path components, retains completed reservation state, and stores long names in the normalizeUnicode cache whose entry-count limit does not bound bytes. Separately, filesFilter memoizes path prefixes when the caller supplies a file list. This issue is fixed in version 8.0.2.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, symlink target escapes the extraction directory through an in-archive symlink chain. An attacker who supplies a tarball can make tar.x() with default options leave symlinks inside the extraction directory that point to any path on the system. tar itself does not write through them, but any later read or write of the extracted files by the application follows them: the demonstration overwrites a file outside the extraction directory and resolves a link to /etc/hostname. This gives arbitrary file read and write as the extracting user. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, node-tar fails to handle an exception when automatically detecting Zstandard (zstd) compression on Node.js runtimes without native zstd support. An attacker who can supply a specially crafted input file to the asynchronous file listing or extraction API can cause an uncaught exception that terminates the process, resulting in denial of service. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, symlink linkpath containment bypass via entry paths ending in '/.'. A crafted archive can create a symlink pointing outside the extraction directory using default options and without any warning. The affected security path includes [STRIPABSOLUTEPATH], linkpath, path.posix.dirname(entry.path). This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, a crafted archive can create a SymbolicLink inside the extraction directory whose linkpath contains a previously created symlink component followed by a parent traversal. STRIPABSOLUTEPATH evaluates the target lexically, but the filesystem follows the earlier symlink first, so the planted link target resolves outside the extraction root. A later consumer that follows the link can read or write outside that root. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, symlink linkpath containment bypass via entry paths ending in '/.'. A crafted archive can create a symlink pointing outside the extraction directory using default options and without any warning. The affected security path includes [STRIPABSOLUTEPATH], linkpath, path.posix.dirname(entry.path). This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, node-tar fails to handle an exception when automatically detecting Zstandard (zstd) compression on Node.js runtimes without native zstd support. An attacker who can supply a specially crafted input file to the asynchronous file listing or extraction API can cause an uncaught exception that terminates the process, resulting in denial of service. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, ReadEntry still applies PAX size values to GNU and PAX metadata entries, causing node-tar to frame archive bodies differently from other tar implementations. Related inconsistencies can bypass maxMetaEntrySize and reverse local-versus-global PAX precedence. The output-archive variant requires the archive-file input repacking feature or Pack.add(ReadEntry); a mismatch between the declared header size and copied body bytes can create additional members in the output archive. Ordinary creation from filesystem inputs is not that repacking surface. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.0.0 until 8.0.0, readEntry: pending PAX size reapplication permits metadata-body file smuggling after the 7.5.16 fix. Applications that inspect attacker-controlled tar archives with a parser that correctly consumes the second PAX metadata body, then extract them with node-tar, can be affected. A member absent from the inspected member set is treated by node-tar as a real entry and can create or truncate a file inside the configured extraction directory. This can bypass archive member allowlists, malware scanning, or policy checks when the inspection and extraction layers use different tar implementations. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, there is a symlink escape from the extraction directory via a trailing /. in the entry path. Any application that extracts attacker-supplied tarballs with tar.x() / tar.extract() and then reads, serves, copies or rewrites the extracted files can be pointed at an arbitrary file outside the extraction directory. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, with preservePaths disabled, a crafted archive can first create an in-root symlink and then create a second SymbolicLink whose linkpath traverses that symlink followed by a parent component. STRIPABSOLUTEPATH evaluates the target lexically, while the filesystem follows the first symlink before applying the parent traversal. The resulting link remains inside the extraction tree but points outside it; access outside the root occurs when a later consumer follows the planted link. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, newline splitting of PAX extended header records permits attacker-controlled entry attributes to be forged. Direct node-tar extraction without strip can overwrite a path within the extraction target. The npm execution chain additionally requires Windows strip:1 normalization, an overwrite of package.json, and later execution of the injected postinstall script; POSIX npm processing with strip:1 is not affected by that chain. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.2, a small crafted archive can exhaust memory or CPU through several path bookkeeping paths. Asynchronous PathReservations performs excessive work for unbounded linkpath depth and long path components, retains completed reservation state, and stores long names in the normalizeUnicode cache whose entry-count limit does not bound bytes. Separately, filesFilter memoizes path prefixes when the caller supplies a file list. This issue is fixed in version 8.0.2.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, there is a symlink escape from the extraction directory via a trailing /. in the entry path. Any application that extracts attacker-supplied tarballs with tar.x() / tar.extract() and then reads, serves, copies or rewrites the extracted files can be pointed at an arbitrary file outside the extraction directory. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, with preservePaths disabled, a crafted archive can first create an in-root symlink and then create a second SymbolicLink whose linkpath traverses that symlink followed by a parent component. STRIPABSOLUTEPATH evaluates the target lexically, while the filesystem follows the first symlink before applying the parent traversal. The resulting link remains inside the extraction tree but points outside it; access outside the root occurs when a later consumer follows the planted link. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, an application that repacks attacker-controlled tar input through the documented archive-file input feature route and relies on an entry filter or inspection can be bypassed by conflicting local and global PAX size values. ReadEntry.size can disagree with the body bytes copied to the output, allowing body bytes to become an additional output member that the filter never inspected. Ordinary extraction is not the claimed filter-bypass surface. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.0 until 8.0.0, parseKV splits length-delimited PAX records on newline characters, so a newline inside a record value can drop the original field and turn a trailing fragment into a forged path, size, linkpath, or other entry attribute. Default extraction confines a forged path to the extraction root. When preservePaths is enabled, the forged path may instead be absolute or contain a parent-directory component. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, the STRIPABSOLUTEPATH linkpath containment check uses path.resolve and collapses parent components without following an earlier archive-created symlink. A second symlink can therefore be planted inside the extraction root while pointing outside it. A later consumer that reads, serves, copies, or archives the extracted tree can follow the link and read an arbitrary file. Hardlinks and subsequent node-tar writes through the planted link remain blocked. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, on non-Windows hosts, SymbolicLink extraction applies Windows-style backslash separator semantics during the linkpath containment check but passes the raw linkpath to the filesystem, where a backslash is an ordinary filename character. A crafted archive can therefore plant a link inside the extraction directory that resolves to a host path outside it. A later consumer can read through the link, but node-tar does not itself establish an arbitrary-write impact. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, an application that repacks attacker-controlled tar input through the documented archive-file input feature route and relies on an entry filter or inspection can be bypassed by conflicting local and global PAX size values. ReadEntry.size can disagree with the body bytes copied to the output, allowing body bytes to become an additional output member that the filter never inspected. Ordinary extraction is not the claimed filter-bypass surface. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, the STRIPABSOLUTEPATH linkpath containment check uses path.resolve and collapses parent components without following an earlier archive-created symlink. A second symlink can therefore be planted inside the extraction root while pointing outside it. A later consumer that reads, serves, copies, or archives the extracted tree can follow the link and read an arbitrary file. Hardlinks and subsequent node-tar writes through the planted link remain blocked. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.0 until 8.0.0, parseKV splits length-delimited PAX records on newline characters, so a newline inside a record value can drop the original field and turn a trailing fragment into a forged path, size, linkpath, or other entry attribute. Default extraction confines a forged path to the extraction root. When preservePaths is enabled, the forged path may instead be absolute or contain a parent-directory component. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, a PAX Global Extended Header containing linkpath can populate entry.linkpath on every entry returned by tar.Parser without a strict-mode warning. Direct tar.Parser or tar.list consumers that trust this value can create paths or symlinks outside their intended directory, resulting in arbitrary file read or write. Node-tar's own tar.x and tar.extract operations are not affected because Unpack separately rejects an escaping linkpath. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.0.0 until 7.5.24, tar: non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing. The affected security path includes tar, size, 17 size=Infinity\n. This issue is fixed in version 7.5.24.
node-tar is a tar archive manipulation library for Node.js. From 7.0.0 until 7.5.24, tar: non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing. The affected security path includes tar, size, 17 size=Infinity\n. This issue is fixed in version 7.5.24.
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, tar.x incorrectly validates symbolic link targets when an archive contains chained symbolic links. An attacker who can supply a crafted archive can cause extraction to create a symbolic link that resolves outside the extraction directory. If the application subsequently follows the link, it may disclose or modify files outside that directory with the application's privileges. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, extraction of a crafted archive with a shallow entry path and deeply nested entry.linkpath bypasses the maxDepth guard and drives quadratic PathReservations.getDirs() allocation. A small crafted archive can exhaust the available Node.js heap and terminate the process. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, when node-tar processes compressed attacker-controlled input, node zlib can materialize the inflated output before maxDecompressionRatio is evaluated. The guard therefore observes an allocation after it occurred rather than bounding it, allowing memory exhaustion despite the configured ratio limit. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, when node-tar processes compressed attacker-controlled input, node zlib can materialize the inflated output before maxDecompressionRatio is evaluated. The guard therefore observes an allocation after it occurred rather than bounding it, allowing memory exhaustion despite the configured ratio limit. This issue is fixed in version 8.0.0.
node-tar is a tar archive manipulation library for Node.js. From 7.5.17 until 8.0.0, during asynchronous extraction, string sanitization removes content after a NUL byte only within the same line. A line terminator followed by a later NUL byte can therefore leave that NUL in a pathname passed to an asynchronous filesystem operation, causing an uncaught exception and process termination. Listing and synchronous extraction do not expose this process-crash behavior. This issue is fixed in version 8.0.0.