---
title: "CWE-90: Improper Neutralization of Special Elements used in an LDAP Query"
url: https://radicalnotion.ai/cwe/cwe-90
type: cwe
description: "The product constructs all or part of an LDAP query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended LDAP query when it is sent to a downstream component."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-90: Improper Neutralization of Special Elements used in an LDAP Query

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

## Description

The product constructs all or part of an LDAP query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended LDAP query when it is sent to a downstream component.

## Alternate terms

- LDAP Injection

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Technologies:** Database Server (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Availability | Execute Unauthorized Code or Commands, Read Application Data, Modify Application Data | An attacker could include input that changes the LDAP query which allows unintended commands or code to be executed, allows sensitive data to be read or modified or causes other unintended behavior. |

## Potential mitigations

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

## 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.)

Effectiveness: High

## Demonstrative examples

### Example 1

The code below constructs an LDAP query using user input address data:

Bad code:

```java
context = new InitialDirContext(env);
String searchFilter = "StreetAddress=" + address;
NamingEnumeration answer = context.search(searchBase, searchFilter, searchCtls);
```

Because the code fails to neutralize the address string used to construct the query, an attacker can supply an address that includes additional LDAP queries.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2021-41232 | Chain: authentication routine in Go-based agile development product does not escape user name (CWE-116), allowing LDAP injection (CWE-90) |
| CVE-2005-2301 | Server does not properly escape LDAP queries, which allows remote attackers to cause a DoS and possibly conduct an LDAP injection attack. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-17392 | Multiple Vulnerabilities in IBM API Connect | critical | 9.9 | - | No | 2026-11-07 |
| CVE-2026-44930 | Apache CXF: LDAP Injection vulnerability in XKMS LDAP Repository | critical | 9.8 | - | No | 2026-05-22 |
| CVE-2026-33289 | SuiterCRM has LDAP Filter Injection in Authentication Module | critical | 9.8 | - | No | 2026-03-19 |
| CVE-2024-54852 | - | critical | 9.8 | - | No | 2025-01-29 |
| CVE-2024-33868 | - | critical | 9.8 | - | No | 2024-05-14 |
| CVE-2023-6905 | Jahastech NxFilter Bind Request ldap injection | critical | 9.8 | - | No | 2023-12-17 |
| CVE-2015-10027 | hydrian TTRSS-Auth-LDAP Username ldap injection | critical | 9.8 | - | No | 2023-01-07 |
| CVE-2021-43350 | LDAP filter injection vulnerability in Traffic Ops | critical | 9.8 | - | No | 2021-11-11 |
| CVE-2021-41232 | Improper Neutralization of Special Elements used in an LDAP Query | critical | 9.8 | - | No | 2021-11-02 |
| CVE-2011-4069 | - | critical | 9.8 | - | No | 2018-02-01 |
| CVE-2017-14596 | - | critical | 9.8 | - | No | 2017-09-20 |
| CVE-2017-8790 | - | critical | 9.8 | - | No | 2017-05-05 |

## Related attack patterns (CAPEC)

- [CAPEC-136](https://radicalnotion.ai/capec/capec-136): LDAP Injection

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-943](https://radicalnotion.ai/cwe/cwe-943) | Improper Neutralization of Special Elements in Data Query Logic |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | LDAP injection | - | - |
| OWASP Top Ten 2007 | Injection Flaws | A2 | CWE More Specific |
| WASC | LDAP Injection | 29 | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |

## Frequently asked questions

### What is CWE-90?

The product constructs all or part of an LDAP query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended LDAP query when it is sent to a downstream component.

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

111 recorded CVEs are attributed to CWE-90, including CVE-2026-17392, CVE-2026-44930 and CVE-2026-33289.

### Is CWE-90 part of the OWASP Top 10?

CWE-90 maps to OWASP Top Ten 2007: Injection Flaws (A2) in the OWASP security taxonomy.

### How do you prevent CWE-90?

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.

### How is CWE-90 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-90?

Exploiting CWE-90 can lead to: Execute Unauthorized Code or Commands, Read Application Data, Modify Application Data.

### Is CWE-90 actively exploited?

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

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

---

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