J2EE Misconfiguration: Plaintext Password in Configuration File
Weakness ID: 555 (Weakness Variant)Status: Draft
+ Description

Description Summary

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 access to the password-protected resource making them an easy target for attackers

+ Time of Introduction
  • Architecture and Design
  • Implementation
+ Demonstrative Examples

Example 1

Below is a snippet from a Java properties file in which the LDAP server password is stored in plaintext.

(Bad Code)
Example Language: Java 
+ Potential Mitigations

Do not hardwire passwords into your software.

Good password management guidelines require that a password never be stored in plaintext.

Use industry standard libraries to encrypt passwords before storage in configuration files.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfCategoryCategory4J2EE Environment Issues
Development Concepts (primary)699
ChildOfWeakness BaseWeakness Base522Insufficiently Protected Credentials
Research Concepts (primary)1000
+ Content History
Submission DateSubmitterOrganizationSource
Anonymous Tool Vendor (under NDA)Externally Mined
Modification DateModifierOrganizationSource
2008-07-01Sean EidemillerCigitalExternal
added/updated demonstrative examples
2008-07-01Eric DalciCigitalExternal
updated Potential Mitigations, Time of Introduction
2008-09-08CWE Content TeamMITREInternal
updated Description, Relationships, Taxonomy Mappings
Previous Entry Names
Change DatePrevious Entry Name
2008-04-11J2EE Misconfiguration: Password in Configuration File