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

Replace npm package "decompress" #1012

Closed
tylerforesthauser opened this issue Feb 27, 2020 · 5 comments
Closed

Replace npm package "decompress" #1012

tylerforesthauser opened this issue Feb 27, 2020 · 5 comments

Comments

@tylerforesthauser
Copy link

Summary

Replace npm package decompress due to vulnerability documented here.

Motivation

All versions of decompress are vulnerable to Arbitrary File Write. The package fails to prevent extraction of files with relative paths, allowing attackers to write to any folder in the system by including filenames containing../.

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-mozjpeg > mozjpeg > bin-build >          │
│               │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-pngquant > pngquant-bin > bin-build >    │
│               │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-webp > cwebp-bin > bin-build >           │
│               │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-mozjpeg > mozjpeg > bin-build > download │
│               │ > decompress                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-pngquant > pngquant-bin > bin-build >    │
│               │ download > decompress                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-webp > cwebp-bin > bin-build > download  │
│               │ > decompress                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-mozjpeg > mozjpeg > bin-wrapper >        │
│               │ download > decompress                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-pngquant > pngquant-bin > bin-wrapper >  │
│               │ download > decompress                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Arbitrary File Write                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ decompress                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gridsome                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gridsome > imagemin-webp > cwebp-bin > bin-wrapper >         │
│               │ download > decompress                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1217                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
@noxify
Copy link
Contributor

noxify commented Feb 27, 2020

Related issue: kevva/decompress#71

@hjvedvik
Copy link
Member

I see there is an open PR for decompress which hopefully will be merged soon.

@noxify
Copy link
Contributor

noxify commented Mar 19, 2020

@hjvedvik it seems that the maintainer of the decompress package is not active currently.

Based on the comments and other repos ( like gatsby gatsbyjs/gatsby#22014 (comment) ) it's a "no real issue" for gridsome. ( but please correct me, if I'm wrong )

Maybe we could update the readme and mark this as known issue?

@a-kriya
Copy link

a-kriya commented Apr 7, 2020

Fixed in release v4.2.1: https://github.com/kevva/decompress/releases

But doesn't look like many packages in the dependent chain have been updated in a while.

@Sergix Sergix closed this as completed Jun 13, 2020
@ChristianSantos07
Copy link

abra o cmd e rode

npm install npm@latest -g

ela pega a ultima versão

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants