Regular Expression Denial of Service (ReDoS) Protection
Blocks catastrophic regex input patterns targeting vulnerable regex implementations. Blocks catastrophic regex input patterns targeting vulnerable regex implementations.
Overview
Blocks catastrophic regex input patterns targeting vulnerable regex implementations.
Feature details
Nested Quantifiers
(a+)+ , (a*)* , (a?)?
Overlapping Alternations
(a|a)+ , (a|aa)+
Long Repetitions
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa with nested patterns
Repeated Groups
(a+)*$ , (.*)*
Evil Regex Patterns
^(([a-z])+.)+[A-Z]([a-z])+$
Polynomial Time Patterns
(a|aa)+b , (a|a)+b
Exponential Time Patterns
(a+)+$ , ([a-zA-Z]+)*$
Long Strings with Repetition
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Known ReDoS Payloads
From OWASP ReDoS list
Low Character Variety + High Length
High entropy + repeating patterns
Input Length Validation (max 10,000 chars default)
Character Variety Analysis (low variety = suspicious)
Repetition Pattern Detection (run-length encoding)
Nested Pattern Matching (regex token parsing)
Execution Timeouts (prevent DoS at runtime)
Memory Usage Monitoring (abort excessive allocations)
Known ReDoS Payload Database
Adaptive Rate Limiting (throttle on detection)
Automated Regex Static Analysis (pre-filter dangerous patterns)
Max Input Length: 10,000 characters (configurable)
Max Repetition Count: 50 consecutive same chars
Low Variety Threshold: < 5 unique chars in input
Execution Timeout: 100ms per regex operation
Block Threshold: Attack score ≥ 8/10
How CloFix WAF uses it
Blocks catastrophic regex input patterns targeting vulnerable regex implementations. Part of the CloFix WAF Core Security Features with real-time scoring, policy controls, and live analytics.
Canonical URL: https://clofix.com/features/clofix-waf/redos/