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

[Check] Add more checks for ReDoS #747

Closed
12 tasks
clintgibler opened this issue Jul 29, 2020 · 3 comments
Closed
12 tasks

[Check] Add more checks for ReDoS #747

clintgibler opened this issue Jul 29, 2020 · 3 comments

Comments

@clintgibler
Copy link
Collaborator

clintgibler commented Jul 29, 2020

Check Description

  • This ticket has links, references, or examples.
  • Your check has true positive and true negative test cases.
  • Your check has been labeled with true positive and false positive findings on at least 10 repositories, and the link is pasted in the ticket. If there are no findings, paste the triager link anyway.
  • Your check PR has been reviewed and merged.
    Now, close the ticket!

This The Regular Expression Denial of Service (ReDoS) cheat-sheet post contains a number of tool links. Here is an incomplete list:

// something like that meaning its auto-vulnerable
// from https://nodejs.org/en/docs/guides/dont-block-the-event-loop/
app.get('/redos-me', (req, res) => {
  let filePath = req.query.filePath;

  // REDOS
  if (filePath.match(/(\/.+)+$/)) {
    console.log('valid path');
  }
  else {
    console.log('invalid path');
  }

  res.sendStatus(200);
});

Other Resources

  • The re.DEBUG flag is useful in identifying dangerously nested patterns source
@inkz
Copy link
Member

inkz commented Nov 24, 2020

PrismJS/prism#2583

@stale
Copy link

stale bot commented Mar 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 29, 2022
@stale
Copy link

stale bot commented Apr 6, 2022

Stale-bot has closed this stale item. Please reopen it if this is in error.

@stale stale bot closed this as completed Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants