1271
The J2EE application stores a plaintext password in a configuration file.
Extended Description
Storing a plaintext password in a configuration file allows anyone who can read the file to access
the password-protected resource, making it an easy target for attackers.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 260 Password in Configuration File 629
Common Consequences
Scope Impact Likelihood
Access Control Bypass Protection Mechanism
Potential Mitigations
Phase: Architecture and Design
Do not hardwire passwords into your software.
Phase: Architecture and Design
Use industry standard libraries to encrypt passwords before storage in configuration files.
Demonstrative Examples
Example 1:
Below is a snippet from a Java properties file in which the LDAP server password is stored in
plaintext.
Example Language: Java (Bad)
webapp.ldap.username=secretUsername
webapp.ldap.password=secretPassword
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 731 OWASP Top Ten 2004 Category A10 - Insecure
Configuration Management
711 2339
MemberOf 963 SFP Secondary Cluster: Exposed Data 888 2400
MemberOf 1396 Comprehensive Categorization: Access Control 1400 2519
CWE-556: ASP.NET Misconfiguration: Use of Identity Impersonation
Weakness ID : 556
Structure : Simple
Abstraction : Variant
Description
CWE Version 4.14
CWE-558: Use of getlogin() in Multithreaded Application
CWE-558: Use of getlogin() in Multithreaded Application