-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
security: vulnerable regex #1222
Comments
Problem: link regex was vulnerable Solution: dedicated parser Fixes: markedjs#1222
out of curiosity what is the part of this regex that is vulnerable? |
The issue is the quantified adjacent whitespaces here: |
* security: replace vulnerable regex with parser Problem: link regex was vulnerable Solution: dedicated parser Fixes: #1222
wouldn't some thing like this solve it? ...\s*(<[\s\S]*?>|[^\s]+)(?:\s+... no more quantified adjacent whitespaces |
and the angle brackets are already being taken out of the url by this line |
This would not solve it, just change the form it took. On malicious input of the form |
* security: replace vulnerable regex with parser Problem: link regex was vulnerable Solution: dedicated parser Fixes: markedjs#1222
The text was updated successfully, but these errors were encountered: