Incomplete List of Disallowed Inputs

Draft Base
Structure: Simple
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.

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.
Common Consequences 1
Scope: Access Control

Impact: Bypass Protection Mechanism

Attackers may be able to find other malicious inputs that were not expected by the developer, allowing them to bypass the intended protection mechanism.

Detection Methods 1
Black Box
Exploitation of a vulnerability with commonly-used manipulations might fail, but minor variations might succeed.
Potential Mitigations 1
Phase: Implementation

Strategy: Input Validation

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.
Demonstrative Examples 1
The following code attempts to stop XSS attacks by removing all occurences of "script" in an input string.

Code Example:

Bad
Java
java
Because the code only checks for the lower-case "script" string, it can be easily defeated with upper-case script tags.
Observed Examples 15
CVE-2024-4315Chain: API for text generation using Large Language Models (LLMs) does not include the "\" Windows folder separator in its denylist (Incomplete List of Disallowed Inputs) when attempting to prevent Local File Inclusion via path traversal (Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')), allowing deletion of arbitrary files on Windows systems.
CVE-2008-2309product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning
CVE-2005-2782PHP remote file inclusion in web application that filters "http" and "https" URLs, but not "ftp".
CVE-2004-0542Programming language does not filter certain shell metacharacters in Windows environment.
CVE-2004-0595XSS filter doesn't filter null characters before looking for dangerous tags, which are ignored by web browsers. MIE and validate-before-cleanse.
CVE-2005-3287Web-based mail product doesn't restrict dangerous extensions such as ASPX on a web server, even though others are prohibited.
CVE-2004-2351Resultant XSS when only <script> and <style> are checked.
CVE-2005-2959Privileged program does not clear sensitive environment variables that are used by bash. Overlaps multiple interpretation error.
CVE-2005-1824SQL injection protection scheme does not quote the "\" special character.
CVE-2005-2184Detection of risky filename extensions prevents users from automatically executing .EXE files, but .LNK is accepted, allowing resultant Windows symbolic link.
CVE-2007-1343Product uses list of protected variables, but accidentally omits one dangerous variable, allowing external modification
CVE-2006-4308Chain: product only checks for use of "javascript:" tag (Incomplete List of Disallowed Inputs), allowing XSS (Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) using other tags
CVE-2007-3572Chain: OS command injection (Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) enabled by using an unexpected character that is not explicitly disallowed (Incomplete List of Disallowed Inputs)
CVE-2002-0661"\" not in list of disallowed values for web server, allowing path traversal attacks when the server is run on Windows and other OSes.
References 3
Exploiting Software: How to Break Code
Greg Hoglund and Gary McGraw
Addison-Wesley
27-02-2004
ID: REF-140
Blacklist defenses as a breeding ground for vulnerability variants
Steve Christey
03-02-2006
ID: REF-141
The Art of Software Security Assessment
Mark Dowd, John McDonald, and Justin Schuh
Addison Wesley
2006
ID: REF-62
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Implementation
Architecture and Design
Alternate Terms

Denylist / Deny List

This is used by CWE and CAPEC instead of other commonly-used terms. Its counterpart is allowlist.

Blocklist / Block List

This is often used by security tools such as firewalls, email or web gateways, proxies, etc.

Blacklist / Black List

This term is frequently used, but usage has been declining as organizations have started to adopt other terms.
Taxonomy Mapping
  • PLOVER
Notes
Relationship 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.