Skip to content

Java: Implement ReDoS and regex injection queries. #2804

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

Open
aschackmull opened this issue Feb 10, 2020 · 2 comments
Open

Java: Implement ReDoS and regex injection queries. #2804

aschackmull opened this issue Feb 10, 2020 · 2 comments
Labels

Comments

@aschackmull
Copy link
Contributor

We'll need to implement ReDoS and regex injection queries following up on #2743

@davisjam
Copy link

FWIW:

  • Weideman's implementation from his MS thesis might be of interest. It handles poly-time regexes as well.
  • In section 7.2 of this paper I introduced some variants to help with slow analyses
  • According to the same paper, you can see that problematic worst-case performance can occur in most languages other than Rust and Go (Figure 6).
  • However, many regex engines have (or are introducing) performance optimizations that address some of these ReDoS issues. So without a dynamic check on the regex's performance, NFA-based analyses can have false positives.

@ChALkeR
Copy link

ChALkeR commented Aug 19, 2021

There seems to be some sort of tooling now that gave me an alert in March 2021, and it's a false positive: #6525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants