-
Notifications
You must be signed in to change notification settings - Fork 945
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
A ReDoS vulnerability exists in matching.coffee #327
Comments
Thank you for the additional report. I think it would be a good idea to compile an (internal) list of these problem cases so we can take care of them in all of these libraries and deal with them in a concerted manner. I am also thinking that writing a fuzzer to test performance of edge cases and document them would be a great idea to identify more of these proactively. Would be a great idea to write a simple tool that could be used to test libraries in a whole bunch of different languages, so we don't have to reinvent the wheel over and over again. |
There are three regex in the regex matcher which are all vulnerable. How can we fix those? I'm not that confident with regex 🤔 |
@DarkTinia would you mind providing a patch here? I am also not great with regex, so I'd be fumbling my way through it for sure. |
Hey @DarkTinia, any chance you've had any time to work on improving that regex against ReDOS? |
Good day, is there any update on fixing this vulnerability and releasing new version? |
it's an excellent finding, how come this is not reported as a CVE? |
@y-nk No idea how to report something as a CVE is why...but I tried reporting this up through Dropbox's bug report chain and went nowhere: |
this a good place to start https://snyk.io/vulnerability-disclosure/ |
The affected code is located in matching.coffee-line321. It uses the vulnerable regular expression
^(.+?)\1+$
. When the match fails, it will cause catastrophic backtracking.I trigger the vulnerability using the javascript script below
I know this is usually used client side,but when run server side there has possible DOS. It is my pleasure to provide a patch to repair the ReDoS vulnerability.
The text was updated successfully, but these errors were encountered: