---
title: "CWE-791: Incomplete Filtering of Special Elements"
url: https://radicalnotion.ai/cwe/cwe-791
type: cwe
description: "The product receives data from an upstream component, but it does not completely filter special elements before sending it 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-791: Incomplete Filtering of Special Elements

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

## Description

The product receives data from an upstream component, but it does not completely filter special elements before sending it to a downstream component.

## Modes of introduction

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

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Unexpected State | - |

## Demonstrative examples

### Example 1

The following code takes untrusted input and uses a regular expression to filter "../" from the input. It then appends this result to the /home/user/ directory and attempts to read the file in the final resulting path.

Bad code:

```perl
my $Username = GetUntrustedInput();
$Username =~ s/\.\.\///;
my $filename = "/home/user/" . $Username;
ReadAndSendFile($filename);
```

Attack code:

```
../../../etc/passwd
```

Result code:

```
../../etc/passwd
```

Result code:

```
/home/user/../../etc/passwd
```

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-0324 | - | critical | 9.4 | - | No | 2025-06-02 |
| CVE-2024-47590 | Cross-Site Scripting (XSS) vulnerability in SAP Web Dispatcher | high | 8.8 | - | No | 2024-11-12 |
| CVE-2026-44232 | dssrf: every IPv6 category bypasses is\_url\_safe | high | 8.7 | - | No | 2026-05-12 |
| CVE-2022-2132 | dpdk: DoS when a Vhost header crosses more than two descriptors and exhausts all mbufs | high | 8.6 | - | No | 2022-08-31 |
| CVE-2024-45481 | Improper authentication in SSH of B&R APROL | high | 8.5 | - | No | 2025-03-25 |
| CVE-2024-39283 | - | high | 8.5 | - | No | 2024-08-14 |
| CVE-2026-11998 | AngularJS XSS via SCE resource URL sanitization bypass | high | 7.6 | - | No | 2026-06-24 |
| CVE-2023-31172 | Incomplete Filtering of Special Elements | high | 7.4 | - | No | 2023-08-31 |
| CVE-2026-86206 | Access control filter bypass allows unauthorised access to APIs | medium | 6.9 | - | No | 2026-09-05 |
| CVE-2025-59303 | haproxy: HAProxy Kubernetes Ingress Controller: Secret Leak via Config Snippets | medium | 6.4 | - | No | 2025-10-08 |
| CVE-2023-1076 | kernel: tap: tap\_open(): correctly initialize socket uid | medium | 5.5 | - | No | 2023-03-27 |
| CVE-2020-36827 | - | medium | 5.4 | - | No | 2024-03-24 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-790](https://radicalnotion.ai/cwe/cwe-790) | Improper Filtering of Special Elements |
| Child | [CWE-792](https://radicalnotion.ai/cwe/cwe-792) | Incomplete Filtering of One or More Instances of Special Elements |
| Child | [CWE-795](https://radicalnotion.ai/cwe/cwe-795) | Only Filtering Special Elements at a Specified Location |

## Frequently asked questions

### What is CWE-791?

The product receives data from an upstream component, but it does not completely filter special elements before sending it to a downstream component.

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

17 recorded CVEs are attributed to CWE-791, including CVE-2025-0324, CVE-2024-47590 and CVE-2026-44232.

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

Exploiting CWE-791 can lead to: Unexpected State.

### Is CWE-791 actively exploited?

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

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

---

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