CWE-185: Incorrect Regular Expression
low-riskThe product specifies a regular expression in a way that causes data to be improperly matched or compared.
Abstraction: Class
Common Consequences
Other
→
Unexpected State
Access Control
→
Bypass Protection Mechanism
Detection Methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Real-World Examples (10)
| CVE | CVSS | EPSS | KEV |
|---|---|---|---|
| CVE-2020-11034 | 6.1 | 58.7% | — |
| CVE-2018-11615 | 7.5 | 12.4% | — |
| CVE-2015-8389 | 9.8 | 2.7% | — |
| CVE-2018-7537 | 5.3 | 2.1% | — |
| CVE-2018-7536 | 5.3 | 1.4% | — |
| CVE-2018-7158 | 7.5 | 1.3% | — |
| CVE-2020-3408 | 8.6 | 1.2% | — |
| CVE-2018-20164 | 5.3 | 1.0% | — |
| CVE-2018-20801 | 7.5 | 0.7% | — |
| CVE-2019-14993 | 7.5 | 0.7% | — |
4
/ 100
low-risk
Active Threat
4/50 · Minimal
Exploit Availability
0/50 · Minimal