---
title: "CWE-178: Improper Handling of Case Sensitivity"
url: https://radicalnotion.ai/cwe/cwe-178
type: cwe
description: "The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-178: Improper Handling of Case Sensitivity

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 143
- **Of those, in CISA KEV:** 0
- **New in 2026:** 99
- **CWE catalog version:** 4.21

## Description

The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Operating systems:** Windows (Undetermined), macOS (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Bypass Protection Mechanism | - |

## Potential mitigations

### Architecture and Design (Input Validation)

Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.

### Implementation (Input Validation)

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

### Implementation (Input Validation)

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

## Demonstrative examples

### Example 1

In the following example, an XSS neutralization method intends to replace script tags in user-supplied input with a safe equivalent:

Bad code:

```java
public String preventXSS(String input, String mask) {
    return input.replaceAll("script", mask);
}
```

The code only works when the "script" tag is in all lower-case, forming an incomplete denylist (CWE-184). Equivalent tags such as "SCRIPT" or "ScRiPt" will not be neutralized by this method, allowing an XSS attack.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2000-0499 | Application server allows attackers to bypass execution of a jsp page and read the source code using an upper case JSP extension in the request. |
| CVE-2000-0497 | The server is case sensitive, so filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype "text". |
| CVE-2000-0498 | The server is case sensitive, so filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype "text". |
| CVE-2001-0766 | A URL that contains some characters whose case is not matched by the server's filters may bypass access restrictions because the case-insensitive file system will then handle the request after it bypasses the case sensitive filter. |
| CVE-2001-0795 | Server allows remote attackers to obtain source code of CGI scripts via URLs that contain MS-DOS conventions such as (1) upper case letters (CWE-178) or (2) 8.3 file names (CWE-58). |
| CVE-2001-1238 | Task Manager does not allow local users to end processes with uppercase letters named (1) winlogon.exe, (2) csrss.exe, (3) smss.exe and (4) services.exe via the Process tab which could allow local users to install Trojan horses that cannot be stopped. |
| CVE-2003-0411 | Chain: Code was ported from a case-sensitive Unix platform to a case-insensitive Windows platform where filetype handlers treat .jsp and .JSP as different extensions. JSP source code may be read because .JSP defaults to the filetype "text". |
| CVE-2002-0485 | Leads to interpretation error |
| CVE-1999-0239 | Directories may be listed because lower case web requests are not properly handled by the server. |
| CVE-2005-0269 | File extension check in forum software only verifies extensions that contain all lowercase letters, which allows remote attackers to upload arbitrary files via file extensions that include uppercase letters. |
| CVE-2004-1083 | Web server restricts access to files in a case sensitive manner, but the filesystem accesses files in a case insensitive manner, which allows remote attackers to read privileged files using alternate capitalization. |
| CVE-2002-2119 | Case insensitive passwords lead to search space reduction. |
| CVE-2004-2214 | HTTP server allows bypass of access restrictions using URIs with mixed case. |
| CVE-2004-2154 | Mixed upper/lowercase allows bypass of ACLs. |
| CVE-2005-4509 | Bypass malicious script detection by using tokens that aren't case sensitive. |
| CVE-2002-1820 | Mixed case problem allows "admin" to have "Admin" rights (alternate name property). |
| CVE-2007-3365 | Chain: uppercase file extensions causes web server to return script source code instead of executing the script. |
| CVE-2021-39155 | Chain: A microservice integration and management platform compares the hostname in the HTTP Host header in a case-sensitive way (CWE-178, CWE-1289), allowing bypass of the authorization policy (CWE-863) using a hostname with mixed case or other variations. |

## Real CVEs with this weakness (sample of 12 of 143)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-116135 | HTTP::Body versions before 1.23\_01 for Perl drop mixed-case percent escapes from urlencoded form fields instead of decoding them | critical | 9.8 | - | No | 2026-10-28 |
| CVE-2026-47323 | Apache Camel: Camel-CXF Message Header Injection via Missing Inbound Filtering | critical | 9.8 | - | No | 2026-05-19 |
| CVE-2025-59944 | Cursor IDE: Sensitive File Overwrite Bypass is Possible | critical | 9.8 | - | No | 2025-10-03 |
| CVE-2024-5699 | - | critical | 9.8 | - | No | 2024-06-11 |
| CVE-2023-3545 | Chamilo LMS Htaccess File Upload Security Bypass | critical | 9.8 | - | No | 2023-11-28 |
| CVE-2022-29604 | - | critical | 9.8 | - | No | 2023-04-20 |
| CVE-2018-9845 | - | critical | 9.8 | - | No | 2018-04-29 |
| CVE-2002-2119 | - | critical | 9.8 | - | No | 2005-08-05 |
| CVE-2004-2214 | - | critical | 9.8 | - | No | 2005-07-17 |
| CVE-2004-2154 | security flaw | critical | 9.8 | - | No | 2005-07-05 |
| CVE-2002-1820 | - | critical | 9.8 | - | No | 2005-06-28 |
| CVE-2005-0269 | - | critical | 9.8 | - | No | 2005-02-10 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-706](https://radicalnotion.ai/cwe/cwe-706) | Use of Incorrectly-Resolved Name or Reference |
| Peer | [CWE-1289](https://radicalnotion.ai/cwe/cwe-1289) | Improper Validation of Unsafe Equivalence in Input |
| Can precede | [CWE-289](https://radicalnotion.ai/cwe/cwe-289) | Authentication Bypass by Alternate Name |
| Can precede | [CWE-433](https://radicalnotion.ai/cwe/cwe-433) | Unparsed Raw Web Content Delivery |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Case Sensitivity (lowercase, uppercase, mixed case) | - | - |

## Frequently asked questions

### What is CWE-178?

The product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results.

### What CVEs are caused by CWE-178?

143 recorded CVEs are attributed to CWE-178, including CVE-2026-116135, CVE-2026-47323 and CVE-2025-59944.

### How do you prevent CWE-178?

Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.

### How is CWE-178 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-178?

Exploiting CWE-178 can lead to: Bypass Protection Mechanism.

### Is CWE-178 actively exploited?

143 recorded CVEs are caused by CWE-178; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/178.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-178). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
