1253
$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.
Example 2:
The following comment, embedded in a JSP, will be displayed in the resulting HTML output.
Example Language: JSP (Bad)
<!-- FIXME: calling this with more than 30 args kills the JDBC server -->
Observed Examples
Reference Description
CVE-2022-25512 Server for Team Awareness Kit (TAK) application includes sensitive tokens in
the JavaScript source code.
https://www.cve.org/CVERecord?id=CVE-2022-25512
CVE-2022-24867 The LDAP password might be visible in the html code of a rendered page in an
IT Asset Management tool.
https://www.cve.org/CVERecord?id=CVE-2022-24867
CVE-2007-6197 Version numbers and internal hostnames leaked in HTML comments.
https://www.cve.org/CVERecord?id=CVE-2007-6197
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 1345 OWASP Top Ten 2021 Category A01:2021 - Broken
Access Control
1344 2487
MemberOf 1417 Comprehensive Categorization: Sensitive Information
Exposure
1400 2548
CWE-541: Inclusion of Sensitive Information in an Include File
Weakness ID : 541
Structure : Simple
Abstraction : Variant
Description
If an include file source is accessible, the file can contain usernames and passwords, as well as
sensitive information pertaining to the application and system.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
CWE Version 4.14
CWE-541: Inclusion of Sensitive Information in an Include File
CWE-541: Inclusion of Sensitive Information in an Include File