CWE-184: Incomplete List of Disallowed Inputs (Base)

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.

Extended Description: 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.


Alternate Terms: ::TERM:Denylist / Deny List:DESCRIPTION:This is used by CWE and CAPEC instead of other commonly-used terms. Its counterpart is allowlist.::TERM:Blocklist / Block List:DESCRIPTION:This is often used by security tools such as firewalls, email or web gateways, proxies, etc.::TERM:Blacklist / Black List:DESCRIPTION:This term is frequently used, but usage has been declining as organizations have started to adopt other terms.::

Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Implementation:NOTE:Developers might begin to develop a list of bad inputs as a fast way to fix a particular weakness, instead of fixing the root cause. See [REF-141].::PHASE:Architecture and Design:NOTE:The design might rely solely on detection of malicious inputs as a protection mechanism.::



Common Consequences: ::SCOPE:Access Control:IMPACT:Bypass Protection Mechanism::

Detection Methods: ::METHOD:Black Box:DESCRIPTION:Exploitation of a vulnerability with commonly-used manipulations might fail, but minor variations might succeed.::

Potential Mitigations: ::PHASE:Implementation:STRATEGY:Input Validation: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.::

Observed Examples: ::REFERENCE:CVE-2008-2309:DESCRIPTION:product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning:LINK:https://www.cve.org/CVERecord?id=CVE-2008-2309::REFERENCE:CVE-2005-2782:DESCRIPTION:PHP remote file inclusion in web application that filters http and https URLs, but not ftp.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2782::REFERENCE:CVE-2004-0542:DESCRIPTION:Programming language does not filter certain shell metacharacters in Windows environment.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0542::REFERENCE:CVE-2004-0595:DESCRIPTION:XSS filter doesn't filter null characters before looking for dangerous tags, which are ignored by web browsers. MIE and validate-before-cleanse.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-0595::REFERENCE:CVE-2005-3287:DESCRIPTION:Web-based mail product doesn't restrict dangerous extensions such as ASPX on a web server, even though others are prohibited.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-3287::REFERENCE:CVE-2004-2351:DESCRIPTION:Resultant XSS when only <script> and <style> are checked.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2351::REFERENCE:CVE-2005-2959:DESCRIPTION:Privileged program does not clear sensitive environment variables that are used by bash. Overlaps multiple interpretation error.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2959::REFERENCE:CVE-2005-1824:DESCRIPTION:SQL injection protection scheme does not quote the special character.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1824::REFERENCE:CVE-2005-2184:DESCRIPTION:Detection of risky filename extensions prevents users from automatically executing .EXE files, but .LNK is accepted, allowing resultant Windows symbolic link.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-2184::REFERENCE:CVE-2007-1343:DESCRIPTION:Product uses list of protected variables, but accidentally omits one dangerous variable, allowing external modification:LINK:https://www.cve.org/CVERecord?id=CVE-2007-1343::REFERENCE:CVE-2007-5727:DESCRIPTION:Chain: product only removes SCRIPT tags (CWE-184), enabling XSS (CWE-79):LINK:https://www.cve.org/CVERecord?id=CVE-2007-5727::REFERENCE:CVE-2006-4308:DESCRIPTION:Chain: product only checks for use of javascript: tag (CWE-184), allowing XSS (CWE-79) using other tags:LINK:https://www.cve.org/CVERecord?id=CVE-2006-4308::REFERENCE:CVE-2007-3572:DESCRIPTION:Chain: OS command injection (CWE-78) enabled by using an unexpected character that is not explicitly disallowed (CWE-184):LINK:https://www.cve.org/CVERecord?id=CVE-2007-3572::REFERENCE:CVE-2002-0661:DESCRIPTION:not in list of disallowed values for web server, allowing path traversal attacks when the server is run on Windows and other OSes.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-0661::



Notes: ::TYPE:Relationship:NOTE:Multiple interpretation errors can indirectly introduce inputs that should be disallowed. For example, a list of dangerous shell metacharacters might not include a metacharacter that only has meaning in one particular shell, not all of them; or a check for XSS manipulations might ignore an unusual construct that is supported by one web browser, but not others.::