-
-
Notifications
You must be signed in to change notification settings - Fork 46
[core] Potential ReDoS Vulnerability or Inefficient Regular Expression in Project: Need for Assessment and Mitigation #65
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
Conversation
Can this PR be reviewed and merged considering this: GHSA-v6h2-p8h4-qcjw |
Hi @juliangruber, please accept the PR :D |
@isaacs I think you have admin write permissions to this repo as well? |
Could this be backported to v2 and v3 releases? |
please also v1 because it's trasitively used by |
) * Create redos.js * Update index.js * Update test/redos.js --------- Co-authored-by: Julian Gruber <[email protected]>
This comment was marked as abuse.
This comment was marked as abuse.
) * Create redos.js * Update index.js * Update test/redos.js --------- Co-authored-by: Julian Gruber <[email protected]>
) * Create redos.js * Update index.js * Update test/redos.js --------- Co-authored-by: Julian Gruber <[email protected]>
@someonestolemyusername pull requests improving the test welcome |
Danke @juliangruber! |
Now the advisory needs to be updated, tried it, but it seems i did a mistake 😕 |
Thanks for backporting the fix @juliangruber! I noticed it's been released on GitHub, but not published to npm yet. Is that something you're working on still? |
@breadadams it has been released to npm as well |
https://build.opensuse.org/request/show/1284756 by user dgarcia + anag_factory - refresh node modules * update brace-expansion to 1.1.12 and 2.0.2 CVE-2025-5889, gh#juliangruber/brace-expansion#65, bsc#1244343
Steps to reproduce
Hello,
I am writing to report a potential Regular Expression Denial of Service (ReDoS) vulnerability or Inefficient Regular Expression in the project. When using specially crafted input strings in the context, it may lead to extremely high CPU usage, application freezing, or denial of service attacks.
Location of Issue:
The vulnerability is related to a regular expression used in the following validation file, which may result in significantly prolonged execution times under certain conditions.
brace-expansion/index.js
Line 157 in 6a39bdd
PoC Files and Comparisons:

gist:https://gist.github.com/mmmsssttt404/37a40ce7d6e5ca604858fe30814d9466
use time:
Proposed Solution:
Change the regular expression to
change:
https://github.com/mmmsssttt404/brace-expansion/blob/a5b98a4f30d7813266b221435e1eaaf25a1b0ac5/index.js#L157
Thank you for your attention to this matter. Your evaluation and response to this potential security concern would be greatly appreciated.
Best regards,
Search keywords: ReDoS