~/talk

Total ReDoS: the dangers of regex in JavaScript

Talkat CPH DevFest 2024 · 2024-08-26..08-30· [javascript, security]
slides:none on file

Explains concrete ReDoS cases and fixes: a simple A+\\$ pattern causes quadratic backtracking and crashed Stack Overflow for 34 minutes, complex .. sequences cause catastrophic exponential backtracking and knocked Cloudflare offline for 27 minutes. Shows offending patterns from node-fetch, node http-cache-semantic, Superhuman and Zod, demonstrates tools regexper, rex.rip and recheck, suggests fixes: limit input length, replace overlapped dot-star with negated classes, avoid nested quantifiers, or use Google's RE2 on the backend and CI eslint plugins to detect vulnerabilities.

AI-written summary · about

  1. 0:00Introduction to ReDoS
  2. 3:36Regular backtracking
  3. 9:49Mitigation strategies
  4. 13:40Catastrophic backtracking
  5. 18:14Cloudflare incident analysis
  6. 22:50Email validation failures
  7. 30:44Refactoring and prevention
  8. 37:45Tools and concluding thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.