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

Export to Word

Description

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

Extended Description

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. The variables may have been initialized incorrectly. If an attacker can initialize the variable, then they can influence what the vulnerable system will do.


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
Architecture and Design N/A
Implementation N/A

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: In the Java example below, a system property controls the debug level of the application.

Body: 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.

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

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

Body: Any user can activate the debug mode, gaining administrator privileges. An attacker may also use the information printed by the phpinfo() function to further exploit the system. .

$debugEnabled = false; if ($_POST["debug"] == "true"){ $debugEnabled = true; } /.../ function login($username, $password){ if($debugEnabled){ echo 'Debug Activated'; phpinfo(); $isAdmin = True; return True; } }

Notes

← Back to CWE list