CWE
Home > CWE List > CWE-184 Individual Dictionary Definition (Draft 9)   View the CWE List

CWE-184 Individual Dictionary Definition (Draft 9)

Incomplete Blacklist
Weakness ID
Status: Draft

184 (Weakness Base)

Description

Summary

An application uses a "blacklist" of prohibited values, but the blacklist is incomplete.

Weakness Ordinality

Primary (Weakness exists independent of other weaknesses)

Potential Mitigations

Ensure black list covers all inappropriate content outlined in the Common Weakness Enumeration.

Combine use of black list with appropriate use of white lists.

Observed Examples
ReferenceDescription
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 from incomplete blacklist (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-2184Incomplete blacklist prevents user from automatically executing .EXE files, but allows .LNK, allowing resultant Windows symbolic link.
CVE-2007-1343product doesn't protect one dangerous variable against external modification
CVE-2007-5727Chain: only removes SCRIPT tags, enabling XSS
CVE-2006-4308Chain: only checks "javascript:" tag
CVE-2007-3572Chain: incomplete blacklist for OS command injection
Context Notes

An incomplete blacklist frequently produces resultant weaknesses. Exploitation of those weaknesses using the obvious manipulations might fail, but minor variations might succeed.

Some incomplete blacklist issues might arise from multiple interpretation errors, e.g. a blacklist for dangerous shell metacharacters might not include a metacharacter that only has meaning in one particular shell, not all of them; or a blacklist for XSS manipulations might ignore an unusual construct that's supported by one web browser, but not others.

References

G. Hoglund and G. McGraw. "Exploiting Software: How to Break Code". Addison-Wesley. February 2004.

S. Christey. "Blacklist defenses as a breeding ground for vulnerability variants". February 2006. <http://seclists.org/fulldisclosure/2006/Feb/0040.html>.

Relationships
NatureTypeIDName
ChildOfCategoryCategory171Cleansing, Canonicalization, and Comparison Errors
ChildOfWeakness ClassWeakness ClassWeakness Class693Protection Mechanism Failure
CanPrecedeWeakness BaseWeakness BaseWeakness Base79Failure to Sanitize Directives in a Web Page (aka 'Cross-site scripting' (XSS))
CanPrecedeWeakness BaseWeakness BaseWeakness Base78Failure to Sanitize Data into an OS Command (aka 'OS Command Injection')
CanPrecedeCompound Element: CompositeCompound Element: Composite434Unrestricted File Upload
CanPrecedeCompound Element: CompositeCompound Element: Composite98Insufficient Control of Filename for Include/Require Statement in PHP Program (aka 'PHP File Inclusion')
CanPrecedeWeakness BaseWeakness BaseWeakness Base79Failure to Sanitize Directives in a Web Page (aka 'Cross-site scripting' (XSS))
CanAlsoBeWeakness BaseWeakness BaseWeakness Base186Overly Restrictive Regular Expression
PeerOfWeakness BaseWeakness BaseWeakness Base625Permissive Regular Expression
PeerOfWeakness VariantWeakness VariantWeakness Variant86Invalid Characters in Identifiers
PeerOfCompound Element: CompositeCompound Element: Composite434Unrestricted File Upload
Source Taxonomies

PLOVER - Incomplete Blacklist

Applicable Platforms

All

Time of Introduction

Architecture and Design

Implementation

Related Attack Patterns
CAPEC-IDAttack Pattern Name
3Using Leading 'Ghost' Character Sequences to Bypass Input Filters
15Command Delimiters
6Argument Injection
43Exploiting Multiple Input Interpretation Layers
71Using Unicode Encoding to Bypass Validation Logic
18Embedding Scripts in Nonscript Elements
63Simple Script Injection
73User-Controlled Filename
85Client Network Footprinting (using AJAX/XSS)
86Embedding Script (XSS ) in HTTP Headers
Page Last Updated: April 21, 2008