---
title: "CWE-99: Improper Control of Resource Identifiers"
url: https://radicalnotion.ai/cwe/cwe-99
type: cwe
description: "The product receives input from an upstream component, but it does not restrict or incorrectly restricts the input before it is used as an identifier for a resource that may be outside the intended control sphere."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-99: Improper Control of Resource Identifiers

- **Abstraction:** Class
- **Structure:** Simple
- **Status:** Draft
- **Likelihood of exploit:** High
- **CVEs with this as primary weakness:** 279
- **Of those, in CISA KEV:** 0
- **New in 2026:** 33
- **CWE catalog version:** 4.21

## Description

The product receives input from an upstream component, but it does not restrict or incorrectly restricts the input before it is used as an identifier for a resource that may be outside the intended control sphere.

## Alternate terms

- **Insecure Direct Object Reference:** OWASP uses this term, although it is effectively the same as resource injection.
- Resource Injection

## Modes of introduction

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

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Application Data, Modify Application Data, Read Files or Directories, Modify Files or Directories | An attacker could gain access to or modify sensitive data or system resources. This could allow access to protected files or directories including configuration files and files containing sensitive information. |

## 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, it 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 following Java code uses input from an HTTP request to create a file name. The programmer has not considered the possibility that an attacker could provide a file name such as "../../tomcat/conf/server.xml", which causes the application to delete one of its own configuration files.

Bad code:

```java
String rName = request.getParameter("reportName");
File rFile = new File("/usr/local/apfr/reports/" + rName);
...
rFile.delete();
```

### Example 2

The following code uses input from the command line to determine which file to open and echo back to the user. If the program runs with privileges and malicious users can create soft links to the file, they can use the program to read the first part of any file on the system.

Bad code:

```c++
ifstream ifs(argv[0]);
string s;
ifs >> s;
cout << s;
```

The kind of resource the data affects indicates the kind of content that may be dangerous. For example, data containing special characters like period, slash, and backslash, are risky when used in methods that interact with the file system. (Resource injection, when it is related to file system resources, sometimes goes by the name "path manipulation.") Similarly, data that contains URLs and URIs is risky for functions that create remote connections.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2013-4787 | Chain: mobile OS verifies cryptographic signature of file in an archive, but then installs a different file with the same name that is also listed in the archive. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-21988 | fs/netfs/read\_collect: add to next-\>prev\_donated | critical | 9.8 | - | No | 2025-04-02 |
| CVE-2025-21829 | RDMA/rxe: Fix the warning "\_\_rxe\_cleanup+0x12c/0x170 \[rdma\_rxe\]" | critical | 9.8 | - | No | 2025-03-06 |
| CVE-2024-53176 | smb: During unmount, ensure all cached dir instances drop their dentry | critical | 9.8 | - | No | 2024-12-27 |
| CVE-2024-53138 | net/mlx5e: kTLS, Fix incorrect page refcounting | critical | 9.8 | - | No | 2024-12-04 |
| CVE-2024-46717 | net/mlx5e: SHAMPO, Fix incorrect page release | critical | 9.8 | - | No | 2024-09-18 |
| CVE-2024-40999 | net: ena: Add validation for completion descriptors consistency | critical | 9.8 | - | No | 2024-07-12 |
| CVE-2024-40923 | vmxnet3: disable rx data ring on dma allocation failure | critical | 9.8 | - | No | 2024-07-12 |
| CVE-2022-1287 | School Club Application System resource injection | critical | 9.8 | - | No | 2022-04-09 |
| CVE-2017-5159 | Improper Control of Resource Identifiers ('Resource Injection') in PHOENIX CONTACT mGuard | critical | 9.8 | - | No | 2017-02-13 |
| CVE-2025-0756 | Hitachi Vantara Pentaho Data Integration & Analytics - Improper Control of Resource Identifiers ('Resource Injection') | critical | 9.1 | - | No | 2025-04-16 |
| CVE-2024-57971 | - | critical | 9.1 | - | No | 2025-02-16 |
| CVE-2022-3774 | SourceCodester Train Scheduler App resource injection | critical | 9.1 | - | No | 2022-10-31 |

## Related attack patterns (CAPEC)

- [CAPEC-10](https://radicalnotion.ai/capec/capec-10): Buffer Overflow via Environment Variables
- [CAPEC-240](https://radicalnotion.ai/capec/capec-240): Resource Injection
- [CAPEC-75](https://radicalnotion.ai/capec/capec-75): Manipulating Writeable Configuration Files

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-74](https://radicalnotion.ai/cwe/cwe-74) | Improper Neutralization of Special Elements in Output Used by a Downstream Component |
| Child | [CWE-641](https://radicalnotion.ai/cwe/cwe-641) | Improper Restriction of Names for Files and Other Resources |
| Child | [CWE-694](https://radicalnotion.ai/cwe/cwe-694) | Use of Multiple Resources with Duplicate Identifier |
| Child | [CWE-914](https://radicalnotion.ai/cwe/cwe-914) | Improper Control of Dynamically-Identified Variables |
| Peer | [CWE-706](https://radicalnotion.ai/cwe/cwe-706) | Use of Incorrectly-Resolved Name or Reference |
| Can also be | [CWE-73](https://radicalnotion.ai/cwe/cwe-73) | External Control of File Name or Path |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Resource Injection | - | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |
| OMG ASCSM | - | ASCSM-CWE-99 | - |

## Frequently asked questions

### What is CWE-99?

The product receives input from an upstream component, but it does not restrict or incorrectly restricts the input before it is used as an identifier for a resource that may be outside the intended control sphere.

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

279 recorded CVEs are attributed to CWE-99, including CVE-2025-21988, CVE-2025-21829 and CVE-2024-53176.

### How do you prevent CWE-99?

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-99 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-99?

Exploiting CWE-99 can lead to: Read Application Data, Modify Application Data, Read Files or Directories, Modify Files or Directories.

### Is CWE-99 actively exploited?

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

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

---

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