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

Table parsing is vulnerable to a ReDOS attack #8

Open
aharpole opened this issue Aug 4, 2021 · 0 comments · Fixed by minad/creole#10
Open

Table parsing is vulnerable to a ReDOS attack #8

aharpole opened this issue Aug 4, 2021 · 0 comments · Fixed by minad/creole#10

Comments

@aharpole
Copy link

aharpole commented Aug 4, 2021

Hi there! I'm a member of GitHub's coding team and I was recently reviewing a report that certain maliciously crafted strings can cause the creole gem to take a long time to render by forcing the gem to spend exponential time matching strings to regular expressions.

Example:

irb(main):006:0> Benchmark.measure { Creole.creolize("|{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{~") }
=> #<Benchmark::Tms:0x00007f9cd7792220 @label="", @real=7.256839563999165, @cstime=0.0, @cutime=0.0, @stime=0.0, @utime=7.256716999999998, @total=7.256716999999998>

The impact for us is not huge (we limit the amount of time spent rendering) but just wanted to pass this info along!

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

Successfully merging a pull request may close this issue.

1 participant