Information Leak Through Comments |
Weakness ID: 615 (Weakness Variant) | Status: Incomplete |
Description Summary
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.
Extended Description
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.
Example 1
The following comment, embedded in a JSP, will be displayed in the resulting HTML output.
(Bad Code)
Example Languages: HTML and JSPĀ
<!-- FIXME: calling this with more than 30 args kills the JDBC server -->
Reference | Description |
---|---|
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. |
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. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 540 | Information Leak Through Source Code | Development Concepts (primary)699 Research Concepts (primary)1000 |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
Anonymous Tool Vendor (under NDA) | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-07-01 | Eric Dalci | Cigital | External | |
updated Potential Mitigations, Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Taxonomy Mappings | ||||
2008-10-14 | CWE Content Team | MITRE | Internal | |
updated Description | ||||
2009-03-10 | CWE Content Team | MITRE | Internal | |
updated Demonstrative Examples | ||||
2009-07-27 | CWE Content Team | MITRE | Internal | |
updated Observed Examples, Taxonomy Mappings |