Repository navigation
Update dependency tar to v7 [SECURITY] - #22
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^2.2.1→^7.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Arbitrary File Overwrite in tar
CVE-2018-20834 / GHSA-j44m-qm6p-hp7m
More information
Details
Versions of
tarprior to 4.4.2 for 4.x and 2.2.2 for 2.x are vulnerable to Arbitrary File Overwrite. Extracting tarballs containing a hardlink to a file that already exists in the system, and a file that matches the hardlink will overwrite the system's file with the contents of the extracted file.Recommendation
For tar 4.x, upgrade to version 4.4.2 or later.
For tar 2.x, upgrade to version 2.2.2 or later.
Severity
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
CVE-2021-32804 / GHSA-3jfq-g458-7qm9
More information
Details
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.
Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization
CVE-2021-37713 / GHSA-5955-9wpr-37jh
More information
Details
Impact
Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution
node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain
..path portions, and resolving the sanitized paths against the extraction target directory.This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as
C:some\path. If the drive letter does not match the extraction target, for exampleD:\extraction\dir, then the result ofpath.resolve(extractionDirectory, entryPath)would resolve against the current working directory on theC:drive, rather than the extraction target directory.Additionally, a
..portion of the path could occur immediately after the drive letter, such asC:../foo, and was not properly sanitized by the logic that checked for..within the normalized and split portions of the path.This only affects users of
node-taron Windows systems.Patches
4.4.18 || 5.0.10 || 6.1.9
Workarounds
There is no reasonable way to work around this issue without performing the same path normalization procedures that node-tar now does.
Users are encouraged to upgrade to the latest patched versions of node-tar, rather than attempt to sanitize paths themselves.
Fix
The fixed versions strip path roots from all paths prior to being resolved against the extraction target folder, even if such paths are not "absolute".
Additionally, a path starting with a drive letter and then two dots, like
c:../, would bypass the check for..path portions. This is checked properly in the patched versions.Finally, a defense in depth check is added, such that if the
entry.absoluteis outside of the extraction taret, and we are not in preservePaths:true mode, a warning is raised on that entry, and it is skipped. Currently, it is believed that this check is redundant, but it did catch some oversights in development.Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning
CVE-2021-32803 / GHSA-r628-mhmh-qjhw
More information
Details
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.
Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
isaacs/node-tar (tar)
v7.5.22Compare Source
v7.5.21Compare Source
v7.5.20Compare Source
v7.5.19Compare Source
v7.5.18Compare Source
v7.5.17Compare Source
v7.5.16Compare Source
v7.5.15Compare Source
v7.5.14Compare Source
v7.5.13Compare Source
v7.5.12Compare Source
v7.5.11Compare Source
v7.5.10Compare Source
v7.5.9Compare Source
v7.5.8Compare Source
v7.5.7Compare Source
v7.5.6Compare Source
v7.5.5Compare Source
v7.5.4Compare Source
v7.5.3Compare Source
v7.5.2Compare Source
v7.5.1Compare Source
v7.5.0Compare Source
v7.4.4Compare Source
v7.4.3Compare Source
v7.4.2Compare Source
v7.4.1Compare Source
v7.4.0Compare Source
v7.3.0Compare Source
v7.2.0Compare Source
v7.1.0Compare Source
v7.0.1Compare Source
v7.0.0Compare Source
v6.2.1Compare Source
v6.2.0Compare Source
v6.1.15Compare Source
v6.1.14Compare Source
v6.1.13Compare Source
Dependencies
cc4e0dd#343 bump minipass from 3.3.6 to 4.0.0v6.1.12Compare Source
Bug Fixes
57493ee#332 ensuring close event is emited after stream has ended (@webark)b003c64#314 replace deprecated String.prototype.substr() (#314) (@CommanderRoot, @lukekarrys)Documentation
f129929#313 remove dead link to benchmarks (#313) (@yetzt)c1faa9fadd examples/explanation of using tar.t (@isaacs)v6.1.11Compare Source
v6.1.10Compare Source
v6.1.9Compare Source
v6.1.8Compare Source
v6.1.7Compare Source
v6.1.6Compare Source
v6.1.5Compare Source
v6.1.4Compare Source
v6.1.3Compare Source
v6.1.2Compare Source
v6.1.1Compare Source
v6.1.0Compare Source
v6.0.5Compare Source
v6.0.4Compare Source
v6.0.3Compare Source
v6.0.2Compare Source
v6.0.1Compare Source
v6.0.0Compare Source
v5.0.11Compare Source
v5.0.10Compare Source
v5.0.9Compare Source
v5.0.8Compare Source
v5.0.7Compare Source
v5.0.6Compare Source
v5.0.5Compare Source
v5.0.4Compare Source
v5.0.2Compare Source
v5.0.1Compare Source
v5.0.0Compare Source
v4.4.19Compare Source
v4.4.18Compare Source
v4.4.17Compare Source
v4.4.16Compare Source
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
v4.4.6Compare Source
v4.4.5Compare Source
v4.4.4Compare Source
v4.4.3Compare Source
v4.4.2Compare Source
v4.4.1Compare Source
v4.4.0Compare Source
v4.3.3Compare Source
v4.3.2Compare Source
v4.3.1Compare Source
v4.3.0Compare Source
v4.2.0Compare Source
v4.1.2Compare Source
v4.1.1Compare Source
v4.1.0Compare Source
v4.0.2Compare Source
v4.0.1Compare Source
v4.0.0Compare Source
v3.2.3Compare Source
v3.2.2Compare Source
v3.2.1Compare Source
v3.2.0Compare Source
v3.1.15Compare Source
v3.1.14Compare Source
v3.1.13Compare Source
v3.1.12Compare Source
v3.1.11Compare Source
v3.1.10Compare Source
v3.1.9Compare Source
v3.1.8Compare Source
v3.1.7Compare Source
v3.1.6Compare Source
v3.1.5Compare Source
v3.1.4Compare Source
v3.1.3Compare Source
v3.1.2Compare Source
v3.1.1Compare Source
v3.1.0Compare Source
v3.0.1Compare Source
v3.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.