Difference between revisions of "Hard-Coded Password"

From OWASP
Jump to: navigation, search
Line 2: Line 2:
  
 
==Description==
 
==Description==
 +
A hard-coded password vulnerability occurs when usernames and passwords are included in HTML comments.  Because HTML comments are not displayed, it was often the mentality that normal users would not see them.  It can also occur when a specific username (usually unique) does not require a password.
  
 
==Examples ==
 
==Examples ==
 +
===Example 1===
 +
This example shows how usernames and passwords can be included within HTML comments:
 +
 +
<pre><form name="login" action="login.php" method="post" onSubmit="return email_Submit();">
 +
    <b>Log in Address: </b>
 +
    <input type="text" name="email" size="29" value="">
 +
    <b>Password: </b>
 +
    <input type="password" name="password" size="29" value="">
 +
 +
<!-- Debugging credentials: wiki@owasp.org:abc123 -->
 +
 +
</form></pre>
 +
 +
===Example 2===
  
 
==Related Threats==
 
==Related Threats==
Line 10: Line 25:
  
 
==Related Vulnerabilities==
 
==Related Vulnerabilities==
 +
* [[Information Leak (information disclosure)]]
 +
* [[Infoleak Using Debug Information]]
  
 
==Related Countermeasures==
 
==Related Countermeasures==

Revision as of 14:55, 22 July 2008

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.


Description

A hard-coded password vulnerability occurs when usernames and passwords are included in HTML comments. Because HTML comments are not displayed, it was often the mentality that normal users would not see them. It can also occur when a specific username (usually unique) does not require a password.

Examples

Example 1

This example shows how usernames and passwords can be included within HTML comments:

<form name="login" action="login.php" method="post" onSubmit="return email_Submit();">
    <b>Log in Address: </b>
    <input type="text" name="email" size="29" value="">
    <b>Password: </b>
    <input type="password" name="password" size="29" value="">

<!-- Debugging credentials: wiki@owasp.org:abc123 -->

</form>

Example 2

Related Threats

Related Attacks

Related Vulnerabilities

Related Countermeasures

Category:Authentication

Categories

This article is a stub. You can help OWASP by expanding it or discussing it on its Talk page.