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.

Primary

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.

Implementation
Developers often try to protect their products against malicious input by checking against lists of known bad inputs, such as special characters that can invoke new commands. However, such lists often only address the most well-known bad inputs. As a quick fix, developers might rely on these lists instead of addressing the root cause of the issue. See [REF-141].

Architecture and Design
The design might rely solely on detection of malicious inputs as a protection mechanism.

Access Control
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.

Black Box
Exploitation of a vulnerability with commonly-used manipulations might fail, but minor variations might succeed.

Implementation
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.

The following code attempts to stop XSS attacks by removing all occurences of "script" in an input string.

public String removeScriptTags(String input, String mask) {return input.replaceAll("script", mask);}

Because the code only checks for the lower-case "script" string, it can be easily defeated with upper-case script tags.

This example takes user input, passes it through an encoding scheme, then lists the contents of the user's home directory based on the user name.

sub GetUntrustedInput {return($ARGV[0]);}
sub encode {my($str) = @_;$str =~ s/\&/\&amp;/gs;$str =~ s/\"/\&quot;/gs;$str =~ s/\'/\&apos;/gs;$str =~ s/\</\&lt;/gs;$str =~ s/\>/\&gt;/gs;return($str);}
sub doit {my $uname = encode(GetUntrustedInput("username"));print "<b>Welcome, $uname!</b><p>\n";system("cd /home/$uname; /bin/ls -l");
}

The programmer attempts to encode dangerous characters, however the denylist for encoding is incomplete (CWE-184) and an attacker can still pass a semicolon, resulting in a chain with OS command injection (CWE-78).
Additionally, the encoding routine is used inappropriately with command execution. An attacker doesn't even need to insert their own semicolon. The attacker can instead leverage the encoding routine to provide the semicolon to separate the commands. If an attacker supplies a string of the form:

' pwd

then the program will encode the apostrophe and insert the semicolon, which functions as a command separator when passed to the system function. This allows the attacker to complete the command injection.

CVE-2024-6091
Chain: AI agent platform does not restrict pathnames containing internal "/./" sequences (CWE-55), leading to an incomplete denylist (CWE-184) that does not prevent OS command injection (CWE-78)
https://www.cve.org/CVERecord?id=CVE-2024-6091

CVE-2024-4315
Chain: API for text generation using Large Language Models (LLMs) does
not include the "\" Windows folder separator in its denylist (CWE-184)
when attempting to prevent Local File Inclusion via path traversal
(CWE-22), allowing deletion of arbitrary files on Windows systems.
https://www.cve.org/CVERecord?id=CVE-2024-4315

CVE-2024-44335
Chain: filter only checks for some shell-injection characters (CWE-184), enabling OS command injection (CWE-78)
https://www.cve.org/CVERecord?id=CVE-2024-44335

CVE-2008-2309
product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning
https://www.cve.org/CVERecord?id=CVE-2008-2309

CVE-2005-2782
PHP remote file inclusion in web application that filters "http" and "https" URLs, but not "ftp".
https://www.cve.org/CVERecord?id=CVE-2005-2782

CVE-2004-0542
Programming language does not filter certain shell metacharacters in Windows environment.
https://www.cve.org/CVERecord?id=CVE-2004-0542

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.
https://www.cve.org/CVERecord?id=CVE-2004-0595

CVE-2005-3287
Web-based mail product doesn't restrict dangerous extensions such as ASPX on a web server, even though others are prohibited.
https://www.cve.org/CVERecord?id=CVE-2005-3287

CVE-2004-2351
Resultant XSS when only <script> and <style> are checked.
https://www.cve.org/CVERecord?id=CVE-2004-2351

CVE-2005-2959
Privileged program does not clear sensitive environment variables that are used by bash. Overlaps multiple interpretation error.
https://www.cve.org/CVERecord?id=CVE-2005-2959

CVE-2005-1824
SQL injection protection scheme does not quote the "\" special character.
https://www.cve.org/CVERecord?id=CVE-2005-1824

CVE-2005-2184
Detection of risky filename extensions prevents users from automatically executing .EXE files, but .LNK is accepted, allowing resultant Windows symbolic link.
https://www.cve.org/CVERecord?id=CVE-2005-2184

CVE-2007-1343
Product uses list of protected variables, but accidentally omits one dangerous variable, allowing external modification
https://www.cve.org/CVERecord?id=CVE-2007-1343

CVE-2007-5727
Chain: product only removes SCRIPT tags (CWE-184), enabling XSS (CWE-79)
https://www.cve.org/CVERecord?id=CVE-2007-5727

CVE-2006-4308
Chain: product only checks for use of "javascript:" tag (CWE-184), allowing XSS (CWE-79) using other tags
https://www.cve.org/CVERecord?id=CVE-2006-4308

CVE-2007-3572
Chain: OS command injection (CWE-78) enabled by using an unexpected character that is not explicitly disallowed (CWE-184)
https://www.cve.org/CVERecord?id=CVE-2007-3572

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.
https://www.cve.org/CVERecord?id=CVE-2002-0661

Incomplete Blacklist

Allowed
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

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.

PLOVER
2006-07-19
Draft 3
2006-07-19

Sean Eidemiller
Cigital
2008-07-01
added/updated demonstrative examples

Eric Dalci
Cigital
2008-07-01
updated Potential_Mitigations, Time_of_Introduction

CWE Content Team
MITRE
2008-09-08
updated Detection_Factors, Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings, Weakness_Ordinalities

CWE Content Team
MITRE
2008-11-24
updated Observed_Examples

CWE Content Team
MITRE
2009-05-27
updated Description, Other_Notes, Relationship_Notes, Time_of_Introduction

CWE Content Team
MITRE
2010-02-16
updated Relationships

CWE Content Team
MITRE
2010-04-05
updated Related_Attack_Patterns

CWE Content Team
MITRE
2010-06-21
updated Demonstrative_Examples

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated References, Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2013-02-21
updated Potential_Mitigations

CWE Content Team
MITRE
2014-07-30
updated Demonstrative_Examples, Relationships

CWE Content Team
MITRE
2015-12-07
updated Relationships

CWE Content Team
MITRE
2017-05-03
updated Potential_Mitigations, Related_Attack_Patterns

CWE Content Team
MITRE
2017-11-08
updated Applicable_Platforms, References

CWE Content Team
MITRE
2018-03-27
updated Observed_Examples, Relationships

CWE Content Team
MITRE
2019-01-03
updated Related_Attack_Patterns

CWE Content Team
MITRE
2019-06-20
updated Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2020-02-24
updated Alternate_Terms, Description, Detection_Factors, Modes_of_Introduction, Name, Observed_Examples, Potential_Mitigations, Relationship_Notes, Relationships

CWE Content Team
MITRE
2020-06-25
updated Alternate_Terms, Observed_Examples

CWE Content Team
MITRE
2021-10-28
updated Relationships

CWE Content Team
MITRE
2023-04-27
updated References, Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes, Relationships

CWE Content Team
MITRE
2024-07-16
4.15
2024-07-16
updated Observed_Examples

CWE Content Team
MITRE
2024-11-19
4.16
2024-11-19
updated Common_Consequences, Description, Diagram, Modes_of_Introduction

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Applicable_Platforms, Demonstrative_Examples, Observed_Examples

Incomplete Blacklist