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.io reports a DoS vulnerability through remark's dependency #1458

Closed
stof opened this issue Feb 8, 2021 · 6 comments
Closed

snyk.io reports a DoS vulnerability through remark's dependency #1458

stof opened this issue Feb 8, 2021 · 6 comments
Labels
🙉 open/needs-info This needs some more info 🐛 type/bug This is a problem

Comments

@stof
Copy link

stof commented Feb 8, 2021

This package currently depends on remark-parse 8.x, which itself depends on trim 0.0.1 which is vulnerable to a regexp DoS.

Remark 9+ has been rewritten and does not depend on this trim package anymore. It would probably make sense to upgrade mdx to use the latest version of Remark (though that might not be easy as the BC breaks in 9.0 might be quite big).

@stof stof added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Feb 8, 2021
@wschaef
Copy link

wschaef commented Feb 24, 2021

The vulnerability has severity HIGH. Any progress on this issue?

@stof
Copy link
Author

stof commented Feb 24, 2021

Looks like #1367 has already done the upgrade work for the next branch. So this is more about an ETA for the release of this next version.

@johno
Copy link
Member

johno commented Feb 25, 2021

We're working towards releasing v2 in the near future. We'll let you know when that happens.

FWIW, this is only a vulnerability if you're processing user input with MDX (though we know this is something that folks are doing).

@johno
Copy link
Member

johno commented Mar 18, 2021

I'm going to close this now since it's addressed in the next branch. Thank you for reporting!

@DigiBanks99
Copy link

This is an incredibly long time to resolve a High vulnerability.

@ChristianMurphy
Copy link
Member

This has been explained a few times, copying the explanation here too https://github.com/mdx-js/mdx/issues?q=is%3Aissue+trim+is%3Aclosed+vulnerable

  1. This is not an exploit, it is a potential slow down. remark-parse 9, react-markdown 6, and mdx 2/xdm address this, and provide other performance improvements.
    https://overreacted.io/npm-audit-broken-by-design provides some additional insights into why npm audit and snyk, while useful, can also be broken for packages like react and mdx, flagging non-issues.
  2. MDX version 1 cannot be patched (less strict version dependecy for "remark-parse" #1548 (comment))
  3. MDX version 2 available as a release candidate and will be generally available soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙉 open/needs-info This needs some more info 🐛 type/bug This is a problem
Development

No branches or pull requests

5 participants