Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snyk vulnerability [SNYK-JS-TAR-1536531] #46

Open
HHogg opened this issue Oct 29, 2021 · 0 comments
Open

Snyk vulnerability [SNYK-JS-TAR-1536531] #46

HHogg opened this issue Oct 29, 2021 · 0 comments
Labels
help wanted Extra attention is needed snyk-vulnerability

Comments

@HHogg
Copy link
Owner

HHogg commented Oct 29, 2021

Affecting Packages/Plugins

Overview

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 home/user/.bashrc.

This logic is insufficient when file paths contain repeated path roots such as ////home/user/.bashrc. 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.

Remediation

Upgrade tar to version 3.2.2, 4.4.14, 5.0.6, 6.1.1 or higher.

References

@HHogg HHogg added help wanted Extra attention is needed snyk-vulnerability labels Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed snyk-vulnerability
Projects
None yet
Development

No branches or pull requests

1 participant