Description
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete, leading to resultant weaknesses.
Developers often try to protect their products against malicious input by performing tests against inputs that are known to be bad, such as special characters that can invoke new commands. However, such lists often only account for the most well-known bad inputs. Attackers may be able to find other malicious inputs that were not expected by the developer, allowing them to bypass the intended protection mechanism.
Modes of Introduction:
– Implementation
Related Weaknesses
CWE-693
CWE-1023
CWE-79
CWE-78
CWE-434
CWE-98
Consequences
Access Control: Bypass Protection Mechanism
Potential Mitigations
Phase: Implementation
Description:
Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify “good” input – such as lists of allowed inputs – and ensure that you are properly encoding your outputs.
CVE References
- CVE-2008-2309
- product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning
- CVE-2005-2782
- PHP remote file inclusion in web application that filters “http” and “https” URLs, but not “ftp”.
- CVE-2004-0542
- Programming language does not filter certain shell metacharacters in Windows environment.
- CVE-2004-0595
- XSS filter doesn’t filter null characters before looking for dangerous tags, which are ignored by web browsers. MIE and validate-before-cleanse.
- CVE-2005-3287
- Web-based mail product doesn’t restrict dangerous extensions such as ASPX on a web server, even though others are prohibited.
- CVE-2004-2351
- Resultant XSS when only
- Resultant XSS when only