CWE-185—Incorrect Regular Expression
PUBLISHEDweakness record
released 2006-07-19 · last modified 2026-04-30
Metadata
- CWE ID:
- CWE-185
- 摘要:
- Class
- 结构:
- Simple
- 状态:
- Draft
- 发布日期:
- 2006-07-19
- 更新日期:
- 2026-04-30
名称
Incorrect Regular Expression
描述
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.
常见后果
- 范围:
- 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
- 注释:
- In PHP, regular expression checks can sometimes be bypassed with a null byte, leading to any number of weaknesses.