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

ReDOS on micromatch/braces (reported on Feb 15th 2019) #7917

Closed
ranand opened this issue Feb 16, 2019 · 11 comments
Closed

ReDOS on micromatch/braces (reported on Feb 15th 2019) #7917

ranand opened this issue Feb 16, 2019 · 11 comments
Labels

Comments

@ranand
Copy link

ranand commented Feb 16, 2019

🐛 Bug Report

I have been noticing https://nodesecurity.io/advisories/786 warnings since yesterday. It looks like braces project had an update (micromatch/braces@abdafb0) to fix the ReDOS issue as well. Is there any chance Jest will update micromatch/braces to fix these warnings?

To Reproduce

135 vulnerabilities found - Packages audited: 52247
Severity: 135 Low
✨  Done in 1.58s.

Screenshot from terminal:
screen shot 2019-02-16 at 2 52 06 pm

Expected behavior

Link to repl or repo (highly encouraged)

See above.
braces fix link: micromatch/braces@abdafb0

Run npx envinfo --preset jest

  System:
    OS: macOS 10.14.2
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  Binaries:
    Node: 11.6.0 - ~/.nvm/versions/node/v11.6.0/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.8.0 - ~/.nvm/versions/node/v11.6.0/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0
@ranand ranand changed the title ReDOS on micromastch (reported on Feb 15th 2019) ReDOS on micromatch (reported on Feb 15th 2019) Feb 16, 2019
@ranand ranand changed the title ReDOS on micromatch (reported on Feb 15th 2019) ReDOS on micromatch/braces (reported on Feb 15th 2019) Feb 16, 2019
@SimenB
Copy link
Member

SimenB commented Feb 16, 2019

We've upgraded in Jest 24. We won't be releasing a patch for 23 unless there's a huge demand

@SimenB SimenB closed this as completed Feb 16, 2019
@sorahn
Copy link

sorahn commented Feb 17, 2019

create-react-app/react-scripts uses Jest 23 :(

@kaiyoma
Copy link

kaiyoma commented Feb 19, 2019

I'd like to see a patch for Jest 23. Jest 24 has async/timeout issues that prevent us from upgrading.

@SimenB
Copy link
Member

SimenB commented Feb 19, 2019

Upgrading micromatch is a breaking change (we tried and had to revert: #6661), so I don't think it's possible to upgrade 23.

Jest 24 has async/timeout issues that prevent us from upgrading.

We haven't changed anything about that (afaik), sounds like a bug

@kaiyoma
Copy link

kaiyoma commented Feb 19, 2019

Okay, thanks for trying! We'll just have to pin what version of braces we use in our project.

As for Jest 24, upgrading has resulted in lots of issues for us. Unit tests that have been reliable for months or years now time out randomly. When I first found this (February 7th), I glanced at the Jest issues that were recently opened and these looked similar:

#7815
#7817

There may be other GitHub issues at this point that better describe the problem (I haven't looked lately). We're considering Jest 24 DOA and sticking with version 23 for now.

@jaredbeck
Copy link

Just FYI, the rails community is also stuck on jest 23 for now, because jest 24 drops support for babel 6 and we're still using babel 6, but not for much longer.

@thymikee
Copy link
Collaborator

You can use jest 24 with babel 6 but you'll still need a bridge and babel-jest 23 to work properly. I think we have it documented in babel configuration docs on our website

@jaredbeck
Copy link

You can use jest 24 with babel 6 but you'll still need a bridge and babel-jest 23 to work properly. I think we have it documented in babel configuration docs on our website

Thanks! I found this (https://jestjs.io/docs/en/getting-started.html#babel-6) but what is a "bridge"?

@thymikee
Copy link
Collaborator

I meant babel-core@7.0.0-brige.0 (a helper package from 6 to 7), but looks like it's not necessary :)

@SimenB
Copy link
Member

SimenB commented Feb 20, 2019

You just need the bridge if you want to use babel 7 with jest 22/23, not babel 6.

https://github.com/babel/babel-bridge

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants