tar is a full-featured Tar for Node.js.
Affected versions of this package are vulnerable to Arbitrary File Overwrite. This is due to insufficient absolute path sanitization.
node-tar aims to prevent extraction of absolute file paths by turning absolute paths into relative paths when the
preservePaths flag is not set to
true. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example, the path
/home/user/.bashrc would turn into
This logic is insufficient when file paths contain repeated path roots such as
node-tar only strips a single path root from such paths. When given an absolute file path with repeating path roots, the resulting path (e.g.
///home/user/.bashrc) still resolves to an absolute path.
tar to version 3.2.2, 4.4.14, 5.0.6, 6.1.1 or higher.