CWEweakness

CWE-454 External Initialization of Trusted Variables or Data Stores

Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Languages
Not Language-Specific, PHP
CWE version
5.0

Description

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

Common consequences

• 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] 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.)

Observed examples

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

Related

Observed example · CVE (5)

  • CVE-2022-43468 External initialization of trusted variables or data stores vulnerability exists in WordPress Popular Posts 6.0.5 and earlier, therefore… vulnerability
  • CVE-2001-0872 OpenSSH 3.0.1 and earlier with UseLogin enabled does not properly cleanse critical environment variables such as LD_PRELOAD, which allows… vulnerability
  • CVE-2001-0033 KTH Kerberos IV allows local users to change the configuration of a Kerberos server running at an elevated privilege by specifying an… vulnerability
  • CVE-2001-0084 GTK+ library allows local users to specify arbitrary modules via the GTK_MODULES environmental variable, which could allow local users to… vulnerability
  • CVE-2000-0959 glibc2 does not properly clear the LD_DEBUG_OUTPUT and LD_DEBUG environmental variables when a program is spawned from a setuid program,… vulnerability

Can also be · CWE (1)

  • CWE-456 Missing Initialization of a Variable weakness

Child of · CWE (1)

  • CWE-1419 Incorrect Initialization of Resource weakness

Referenced by CVE · weakness (4)

  • CVE-2026-54003 Kirby is an open-source content management system. vulnerability
  • CVE-2026-48980 pam_usb provides hardware authentication for Linux using removable media. vulnerability
  • CVE-2026-26148 External initialization of trusted variables or data stores in Azure Entra ID allows an unauthorized attacker to elevate privileges locally. vulnerability
  • CVE-2025-36244 IBM AIX 7.2, 7.3, IBM VIOS 3.1, and 4.1, when configured to use Kerberos network authentication, could allow a local user to write to files… vulnerability

Referenced by CWE · has member (1)

Referenced by OWASP · mapped cwe (1)