1254
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 540 Inclusion of Sensitive Information in Source Code 1251
Common Consequences
Scope Impact Likelihood
Confidentiality Read Application Data
Potential Mitigations
Phase: Architecture and Design
Do not store sensitive information in include files.
Phase: Architecture and Design
Phase: System Configuration
Protect include files from being exposed.
Demonstrative Examples
Example 1:
The following code uses an include file to store database credentials:
database.inc
Example Language: PHP (Bad)
<?php
$dbName = 'usersDB';
$dbPassword = 'skjdh#67nkjd3$3$';
?>
login.php
Example Language: PHP (Bad)
<?php
include('database.inc');
$db = connectToDB($dbName, $dbPassword);
$db.authenticateUser($username, $password);
?>
If the server does not have an explicit handler set for .inc files it may send the contents of
database.inc to an attacker without pre-processing, if the attacker requests the file directly. This will
expose the database name and password.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 731 OWASP Top Ten 2004 Category A10 - Insecure
Configuration Management
711 2339
MemberOf 963 SFP Secondary Cluster: Exposed Data 888 2400
MemberOf 1349 OWASP Top Ten 2021 Category A05:2021 - Security
Misconfiguration
1344 2493
MemberOf 1417 Comprehensive Categorization: Sensitive Information
Exposure
1400 2548
CWE Version 4.14
CWE-543: Use of Singleton Pattern Without Synchronization in a Multithreaded Context
CWE-543: Use of Singleton Pattern Without
Synchronization in a Multithreaded Context