CWE-615: Inclusion of Sensitive Information in Source Code Comments
While adding general comments is very useful, some programmers tend to leave important data, such as: filenames related to the web application, old links or links which were not meant to be browsed by users, old code fragments, etc.
Last updated
Overview
An attacker who finds these comments can map the application's structure and files, expose hidden parts of the site, and study the fragments of code to reverse engineer the application, which may help develop further attacks against the site.
Real-world CVEs
3 recorded CVEs are caused by CWE-615 (Inclusion of Sensitive Information in Source Code Comments). The highest-severity and most recent are shown first. 2 new CWE-615 CVEs have been recorded so far in 2026.
- CVE-2024-52298
macro-pdfviewer's preview in WYSIWYG editor allows accessing any PDF document as the last author
High · CVSS 7.5 · EPSS 52th2024-11-13 - CVE-2026-3157
Security Vulnerability in IBM Sterling B2B Integrator and IBM Sterling File Gateway due to information disclosure in mailbox UI
Medium · CVSS 4.3 · EPSS 23th2026-07-28 - CVE-2026-3158
Security Vulnerability in IBM Sterling B2B Integrator and IBM Sterling File Gateway due to information disclosure
Medium · CVSS 4.3 · EPSS 23th2026-07-28
Common consequences
What can happen when CWE-615 is exploited.
Read Application Data
Affects: Confidentiality
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-615, grouped by where in the lifecycle they apply.
Remove comments which have sensitive information about the design/implementation of the application. Some of the comments may be exposed to the user and affect the security posture of the application.
How to detect it
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Code examples
MITRE examples of the weakness in code.
The following comment, embedded in a JSP, will be displayed in the resulting HTML output.
Vulnerable example
<!-- FIXME: calling this with more than 30 args kills the JDBC server -->Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2007-6197 — Version numbers and internal hostnames leaked in HTML comments.
- CVE-2007-4072 — CMS places full pathname of server in HTML comment.
- CVE-2009-2431 — blog software leaks real username in HTML comment.
Frequently asked questions
Common questions about CWE-615.
- What is CWE-615?
- While adding general comments is very useful, some programmers tend to leave important data, such as: filenames related to the web application, old links or links which were not meant to be browsed by users, old code fragments, etc.
- What CVEs are caused by CWE-615?
- 3 recorded CVEs are attributed to CWE-615, including CVE-2024-52298, CVE-2026-3157 and CVE-2026-3158.
- How do you prevent CWE-615?
- Remove comments which have sensitive information about the design/implementation of the application. Some of the comments may be exposed to the user and affect the security posture of the application.
- How is CWE-615 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-615?
- Exploiting CWE-615 can lead to: Read Application Data.
- Is CWE-615 actively exploited?
- 3 recorded CVEs are caused by CWE-615; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-615) (opens in a new tab)
- CWE-615 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-615 CVEs
Get an alert when a new CWE-615 CVE affects your products, with AI-written analysis and remediation steps.