---
title: "CWE-454: External Initialization of Trusted Variables or Data Stores"
url: https://radicalnotion.ai/cwe/cwe-454
type: cwe
description: "The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-454: External Initialization of Trusted Variables or Data Stores

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

## Description

The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | - |

## Applicable platforms

**Languages:** PHP (Sometimes)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Modify Application Data | If an attacker can initialize the variable incorrectly, this can influence what the product will do. The attacker could gain access to and modify sensitive data or system information. |

## Potential mitigations

### Implementation (Input Validation)

A product system should be reluctant to trust variables that have been initialized outside of its trust boundary, especially if they are initialized by users. Ensure adequate checking (e.g. input validation) is performed when relying on input from outside a trust boundary.

### Architecture and Design

Avoid any external control of variables. If necessary, restrict the variables that can be modified using an allowlist, and use a different namespace or naming convention if possible.

## 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 Java example below, a system property controls the debug level of the application.

Bad code:

```java
int debugLevel = Integer.getInteger("com.domain.application.debugLevel").intValue();
```

If an attacker is able to modify the system property, then it may be possible to coax the application into divulging sensitive information by virtue of the fact that additional debug information is printed/exposed as the debug level increases.

### Example 2

This code checks the HTTP POST request for a debug switch, and enables a debug mode if the switch is set.

Bad code:

```php
$debugEnabled = false;
if ($_POST["debug"] == "true"){
    $debugEnabled = true;
}
/.../

function login($username, $password){
    if($debugEnabled){
        echo 'Debug Activated';
        phpinfo();
        $isAdmin = True;
        return True;
    }
}
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-43468 | WordPress module sets internal variables based on external inputs, allowing false reporting of the number of views |
| CVE-2000-0959 | Does not clear dangerous environment variables, enabling symlink attack. |
| CVE-2001-0033 | Specify alternate configuration directory in environment variable, enabling untrusted path. |
| CVE-2001-0872 | Dangerous environment variable not cleansed. |
| CVE-2001-0084 | Specify arbitrary modules using environment variable. |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-54003 | Kirby: External Initialization of the Panel on reverse proxy setups with the \`Forwarded\` header | critical | 9.1 | - | No | 2026-07-09 |
| CVE-2026-121720 | - | high | 8.5 | - | No | 2026-11-18 |
| CVE-2026-26148 | Microsoft Azure AD SSH Login extension for Linux Elevation of Privilege Vulnerability | high | 8.1 | - | No | 2026-03-10 |
| CVE-2025-36244 | IBM AIX privilege escalation | high | 7.4 | - | No | 2025-09-16 |
| CVE-2026-48980 | pam\_usb: getenv() used in PAM context allows environment variable injection into local-check logic | medium | 6.3 | - | No | 2026-06-18 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-1419](https://radicalnotion.ai/cwe/cwe-1419) | Incorrect Initialization of Resource |
| Can also be | [CWE-456](https://radicalnotion.ai/cwe/cwe-456) | Missing Initialization of a Variable |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | External initialization of trusted variables or values | - | - |
| Software Fault Patterns | Tainted input to variable | SFP25 | - |

## Frequently asked questions

### What is CWE-454?

The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.

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

5 recorded CVEs are attributed to CWE-454, including CVE-2026-54003, CVE-2026-121720 and CVE-2026-26148.

### How do you prevent CWE-454?

A product system should be reluctant to trust variables that have been initialized outside of its trust boundary, especially if they are initialized by users. Ensure adequate checking (e.g. input validation) is performed when relying on input from outside a trust boundary.

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

Exploiting CWE-454 can lead to: Modify Application Data.

### Is CWE-454 actively exploited?

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

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

---

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