CWE-185 - Incorrect Regular Expression
CWE-185
- Abstraction:
- Class
- Structure:
- Simple
- Status:
- Draft
- Weakness Name
Incorrect Regular Expression
- Description
The product specifies a regular expression in a way that causes data to be improperly matched or compared.
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.
- Common Consequences
Scope: Other
Impact: Unexpected State, Varies by Context
Notes: 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.
Scope: Access Control
Impact: Bypass Protection Mechanism
Notes: In PHP, regular expression checks can sometimes be bypassed with a null byte, leading to any number of weaknesses.
- Related Weaknesses
- Release Date:
- 2006-07-19
- Latest Modification Date:
- 2023-06-29
Free security scan for your website