1. CVE archive
  2. Vulnerability types
  3. CWE-185
CWE-185 · #259 most frequent type in the archive

Incorrect Regular Expression

The product specifies a regular expression in a way that causes data to be improperly matched or compared.

Part of: CWE-697 · Incorrect Comparison

38CVEs of this type in the archive
4critical (CVSS ≥ 9)
13high severity (7–8.9)
Nov 28, 2026latest published

What it is

The product specifies a regular expression in a way that causes data to be improperly matched or compared.

Impact on systems

ScopeImpact
Other Unexpected State, Varies by Context
When the regular expression is not correctly specified, data might have a different format or type than the rest of the program expects, producing resultant weaknesses or errors.
Access Control Bypass Protection Mechanism
When the regular expression is used in protection mechanisms such as filtering or validation, this may allow an attacker to bypass the intended restrictions on the incoming data.
Access Control Bypass Protection Mechanism
In PHP, regular expression checks can sometimes be bypassed with a null byte, leading to any number of weaknesses.

How to prevent it

Implementation · Refactoring Regular expressions can become error prone when defining a complex language even for those experienced in writing grammars. Determine if several smaller regular expressions simplify one large regular expression. Also, subject the regular expression to thorough testing techniques such as equivalence partitioning, boundary value analysis, and robustness. After testing and a reasonable confidence level is achieved, a regular expression may not be foolproof. If an exploit is allowed to slip through, then record the exploit and refactor the regular expression.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-185 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20187
20194
20201
20212
20241
20251
202622

All CWE-185 CVEs

38 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.