CWE-540
Inclusion of Sensitive Information in Source Code
Description
Source code on a web server or repository often contains sensitive information and should generally not be accessible to users.
There are situations where it is critical to remove source code from an area or server. For example, obtaining Perl source code on a system allows an attacker to understand the logic of the script and extract extremely useful information such as code bugs or logins and passwords.
Parent Weaknesses (ChildOf)
Common Consequences
Scope
Impact
Read Application Data
Potential Mitigations
Recommendations include removing this script from the web server and moving it to a location not accessible from the Internet.
CVE-2022-25512Server for Team Awareness Kit (TAK) application includes sensitive tokens in the JavaScript source code.
CVE-2022-24867The LDAP password might be visible in the html code of a rendered page in an IT Asset Management tool.
CVE-2007-6197Version numbers and internal hostnames leaked in HTML comments.
Applicable Platforms
Security Training
Train your team to recognize and prevent security threats with our comprehensive security awareness program.
Start TrainingVulnerability Scanning
Discover vulnerabilities in your applications and infrastructure before attackers do.
Scan Now