622
Relevant to the view "Architectural Concepts" (CWE-1008)
Nature Type ID Name Page
MemberOf 1010 Authenticate Actors 2424
Weakness Ordinalities
Primary :
Applicable Platforms
Language : Not Language-Specific (Prevalence = Undetermined)
Likelihood Of Exploit
High
Common Consequences
Scope Impact Likelihood
Access Control Gain Privileges or Assume Identity
Potential Mitigations
Phase: System Configuration
Passwords should be at least eight characters long -- the longer the better. Avoid passwords
that are in any way similar to other passwords you have. Avoid using words that may be found
in a dictionary, names book, on a map, etc. Consider incorporating numbers and/or punctuation
into your password. If you do use common words, consider replacing letters in that word with
numbers and punctuation. However, do not use "similar-looking" punctuation. For example,
it is not a good idea to change cat to c@t, ca+, (@+, or anything similar. Finally, it is never
appropriate to use an empty string as a password.
Demonstrative Examples
Example 1:
The following examples show a portion of properties and configuration files for Java and ASP.NET
applications. The files include username and password information but the password is provided as
an empty string.
This Java example shows a properties file with an empty password string.
Example Language: Java (Bad)
# Java Web App ResourceBundle properties file
...
webapp.ldap.username=secretUsername
webapp.ldap.password=
...
The following example shows a portion of a configuration file for an ASP.Net application. This
configuration file includes username and password information for a connection to a database and
the password is provided as an empty string.
Example Language: ASP.NET (Bad)
...
<connectionStrings>
<add name="ud_DEV" connectionString="connectDB=uDB; uid=db2admin; pwd=; dbalias=uDB;"
providerName="System.Data.Odbc" />
</connectionStrings>
...
CWE Version 4.14
CWE-259: Use of Hard-coded Password
CWE-259: Use of Hard-coded Password