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

Please update jpeg-js #359

Closed
kockok opened this issue Jun 19, 2022 · 12 comments
Closed

Please update jpeg-js #359

kockok opened this issue Jun 19, 2022 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@kockok
Copy link

kockok commented Jun 19, 2022

Bug summary

jpeg-js  <0.4.4
Severity: moderate
Infinite loop in jpeg-js - https://github.com/advisories/GHSA-xvf7-4v9q-58w6
fix available via `npm audit fix --force`
Will install react-native-bootsplash@2.2.8, which is a breaking change
node_modules/jpeg-js
  @jimp/jpeg  <=0.12.0 || >=0.16.1
  Depends on vulnerable versions of jpeg-js
  node_modules/@jimp/jpeg
    @jimp/types  <=0.11.1-canary.891.908.0 || >=0.16.1
    Depends on vulnerable versions of @jimp/jpeg
    node_modules/@jimp/types
      jimp  0.3.6-alpha.5 - 0.11.1-canary.891.908.0 || >=0.16.1
      Depends on vulnerable versions of @jimp/types
      node_modules/jimp
        react-native-bootsplash  1.2.1 - 2.2.4 || >=3.0.0-alpha.0
        Depends on vulnerable versions of jimp
        node_modules/react-native-bootsplash

5 moderate severity vulnerabilities

Library version

"react-native-bootsplash": "^4.1.5"

Environment info

Normal.

Steps to reproduce

  1. npm install --force
  2. npm audit

Reproducible sample code

`npm audit`
@kockok kockok added the bug Something isn't working label Jun 19, 2022
@zoontek
Copy link
Owner

zoontek commented Jun 19, 2022

@zoontek zoontek closed this as completed Jun 19, 2022
@kockok
Copy link
Author

kockok commented Jun 20, 2022

Done in https://github.com/zoontek/react-native-bootsplash/releases/tag/4.1.6

I don't know if it's only me, but I still have the 5 moderate severity vulnerabilities flagged.

I did try running npm cache verify clean.
And deleted node_modules and then reinstalled again.

@efstathiosntonas
Copy link

@kockok you mean flagged them on your github repo or locally? If on repo then you must manually resolve them by clicking the dropdown on top right (under Security tab) and then select the resolve option that suits you.

@kockok
Copy link
Author

kockok commented Jun 20, 2022

@efstathiosntonas No, I just ran npm audit

@efstathiosntonas
Copy link

@kockok try find ./node_modules/ -name package.json | xargs grep jpeg-js to see which package might uses jpeg-js, in my case I had 2 packages using it:

./node_modules//@jimp/jpeg/package.json:    "jpeg-js": "0.4.2"
./node_modules//react-native-bootsplash/package.json:    "jpeg-js": "0.4.4"

@efstathiosntonas
Copy link

efstathiosntonas commented Jun 20, 2022

@zoontek it seems "jimp": "^0.16.1" still uses the problematic jpeg-js, there's a PR pending: jimp-dev/jimp#1087, just fyi.

@efstathiosntonas
Copy link

@kockok and everyone else affected by this, just add this in package.json until PR from above is merged/released:

yarn:

"resolutions": {
    "jpeg-js": "0.4.4"
  }

in case of npm use npm-force-resolutions

@zoontek
Copy link
Owner

zoontek commented Jun 20, 2022

Version has been pinned for yarn:

"jpeg-js": "0.4.4"

For npm 8+, you can use overrides: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides in your own package.json.

I will update the package again once jimp will be updated.

@conceptualspace
Copy link
Contributor

FYI jimp has been updated with the security fix: https://github.com/oliver-moran/jimp/releases/tag/v0.16.2

@zoontek
Copy link
Owner

zoontek commented Oct 21, 2022

@conceptualspace Thanks for the info! Do you have a bit of time to shoot a PR? (and remove the pined versions of jpeg-js in the project and the example)?

@conceptualspace
Copy link
Contributor

done: #396

cheers

@efstathiosntonas
Copy link

Thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants