CWEweakness
CWE-615 Inclusion of Sensitive Information in Source Code Comments
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product's source code includes comments that contain sensitive information, such as filenames related to the application, old links or links that were not meant to be browsed by users, old code fragments, etc.
Common consequences
• Confidentiality: Read Application Data — 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.
Potential mitigations
• [Distribution] 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.
Detection methods
• 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.)
Observed examples
• 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.
Related
Observed example · CVE (3)
- CVE-2009-2431 WordPress 2.7.1 places the username of a post's author in an HTML comment, which allows remote attackers to obtain sensitive information by… vulnerability
- CVE-2007-6197 The Plumtree portal in BEA AquaLogic Interaction 5.0.2 through 5.0.4 and 6.0.1.218452 allows remote attackers to obtain version numbers and… vulnerability
- CVE-2007-4072 Webbler CMS before 3.1.6 provides the full installation path within HTML comments in certain documents, which allows remote attackers to… vulnerability
Child of · CWE (1)
- CWE-540 Inclusion of Sensitive Information in Source Code weakness
Peer of · CWE (1)
- CWE-546 Suspicious Comment weakness
Referenced by CVE · weakness (3)
- CVE-2026-3157 IBM Sterling B2B Integrator 6.2.0.0 through 6.2.0.5_2, 6.2.1.0 through 6.2.1.1_2, and 6.2.2.0 through 6.2.2.0_1 and IBM Sterling File… vulnerability
- CVE-2026-3158 IBM Sterling B2B Integrator 6.2.0.0 through 6.2.0.5_2, 6.2.1.0 through 6.2.1.1_2, and 6.2.2.0 through 6.2.2.0_1 and IBM Sterling File… vulnerability
- CVE-2024-52298 macro-pdfviewer is a PDF Viewer Macro for XWiki using Mozilla pdf.js. vulnerability
Referenced by OWASP · mapped cwe (1)
- A01:2025 Broken Access Control Top 10 2025