fix(deps): update dependency tar to v4.4.15 [security] #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.4.6->4.4.15GitHub Vulnerability Alerts
CVE-2021-32804
Impact
Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution
node-taraims to prevent extraction of absolute file paths by turning absolute paths into relative paths when thepreservePathsflag is not set totrue. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example/home/user/.bashrcwould turn intohome/user/.bashrc.This logic was insufficient when file paths contained repeated path roots such as
////home/user/.bashrc.node-tarwould only strip 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) would still resolve to an absolute path, thus allowing arbitrary file creation and overwrite.Patches
3.2.2 || 4.4.14 || 5.0.6 || 6.1.1
NOTE: an adjacent issue CVE-2021-32803 affects this release level. Please ensure you update to the latest patch levels that address CVE-2021-32803 as well if this adjacent issue affects your
node-taruse case.Workarounds
Users may work around this vulnerability without upgrading by creating a custom
onentrymethod which sanitizes theentry.pathor afiltermethod which removes entries with absolute paths.Users are encouraged to upgrade to the latest patch versions, rather than attempt to sanitize tar input themselves.
CVE-2021-32803
Impact
Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution
node-taraims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessarystatcalls to determine whether a given path is a directory, paths are cached when directories are created.This logic was insufficient when extracting tar files that contained both a directory and a symlink with the same name as the directory. This order of operations resulted in the directory being created and added to the
node-tardirectory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also wherenode-tarchecks for symlinks occur.By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass
node-tarsymlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite.This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2.
Patches
3.2.3 || 4.4.15 || 5.0.7 || 6.1.2
Workarounds
Users may work around this vulnerability without upgrading by creating a custom
filtermethod which prevents the extraction of symbolic links.Users are encouraged to upgrade to the latest patch versions, rather than attempt to sanitize tar input themselves.
Release Notes
npm/node-tar
v4.4.15Compare Source
v4.4.14Compare Source
v4.4.13Compare Source
v4.4.12Compare Source
v4.4.11Compare Source
v4.4.10Compare Source
v4.4.9Compare Source
v4.4.8Compare Source
v4.4.7Compare Source
Configuration
📅 Schedule: "" (UTC).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.