External Initialization of Trusted Variables or Data Stores |
Weakness ID: 454 (Weakness Base) | Status: Draft |
Description Summary
Extended Description
A software system should be reluctant to trust variables that have been initialized outside of its trust boundary, especially if they are initialized by users. They may have been initialized incorrectly. If an attacker can initialize the variable, then he/she can influence what the vulnerable system will do.
Languages
PHP: (Sometimes)
All
Platform Notes
This is often found in PHP due to register_globals and the common practice of storing library/include files under the web document root so that they are available using a direct request.
Example 1
In the Java example below, a system property controls the debug level of the application. If an attacker is able to modify the system property, he may be able 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.
Reference | Description |
---|---|
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. |
A software system should be reluctant to trust variables that have been initialized outside of its trust boundary. Ensure adequate checking (e.g. input validation) is performed when relying on input from outside a trust boundary. |
Phase: Architecture and Design Avoid any external control of variables. If necessary, restrict the variables that can be modified using a whitelist, and use a different namespace or naming convention if possible. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 452 | Initialization and Cleanup Errors | Development Concepts (primary)699 |
ChildOf | ![]() | 665 | Improper Initialization | Research Concepts (primary)1000 |
ChildOf | ![]() | 808 | 2010 Top 25 - Weaknesses On the Cusp | Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors (primary)800 |
CanAlsoBe | ![]() | 456 | Missing Initialization | Research Concepts1000 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
PLOVER | External initialization of trusted variables or values |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
PLOVER | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-07-01 | Eric Dalci | Cigital | External | |
updated Potential Mitigations, Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Applicable Platforms, Description, Relationships, Other Notes, Taxonomy Mappings | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Other Notes, Relationship Notes | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | External Initialization of Trusted Variables or Values | |||