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.
Threat Mapped score: 3.25
Industry: Finiancial
Threat priority: P2 - Serious (High)
CVE: CVE-2022-25512
Server for Team Awareness Kit (TAK) application includes sensitive tokens in the JavaScript source code.
CVE: CVE-2022-24867
The LDAP password might be visible in the html code of a rendered page in an IT Asset Management tool.
CVE: CVE-2007-6197
Version numbers and internal hostnames leaked in HTML comments.
N/A
N/A
Phase | Note |
---|---|
Implementation | N/A |
Intro: The following code uses an include file to store database credentials:
Body: database.inc
<?php $dbName = 'usersDB'; $dbPassword = 'skjdh#67nkjd3$3$'; ?>
Intro: The following comment, embedded in a JSP, will be displayed in the resulting HTML output.
<!-- FIXME: calling this with more than 30 args kills the JDBC server -->