Overly Restrictive Regular Expression |
Weakness ID: 186 (Weakness Base) | Status: Draft |
Description Summary
A regular expression is overly restrictive, which prevents dangerous values from being detected.
Reference | Description |
---|---|
CVE-2005-1604 | MIE. ".php.ns" bypasses ".php$" regexp but is still parsed as PHP by Apache. (manipulates an equivalence property under Apache) |
Phase: Implementation 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 your 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 your regular expression. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 185 | Incorrect Regular Expression | Development Concepts (primary)699 Research Concepts (primary)1000 |
CanAlsoBe | ![]() | 183 | Permissive Whitelist | Research Concepts1000 |
CanAlsoBe | ![]() | 184 | Incomplete Blacklist | Research Concepts1000 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
PLOVER | Overly Restrictive Regular Expression |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
PLOVER | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Potential Mitigations, Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Relationship Notes, Taxonomy Mappings |