Regular expression built from user input detected.
- Rule ID: javascript_lang_regex_using_user_input
- Languages: javascript
- Source: regex_using_user_input.yml
Description
Applications should avoid constructing regular expressions from user input. Regular expressions can have exponential worst-case computational complexity, allowing users to trigger this behaviour can result in excessive CPU consumption causing a regular expression denial of service (ReDoS).
Remediations
❌ Avoid using untrusted or user data when building regular expressions
Resources
Associated CWE
Ready to take the next step? Join the Bearer Cloud waitlist.