Variant · Low-Medium

CWE-555: J2EE Misconfiguration: Plaintext Password in Configuration File

The J2EE application stores a plaintext password in a configuration file.

CWE-555 · Variant Level ·2 Mitigations

Description

The J2EE application stores a plaintext password in a configuration file.

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.

Potential Impact

Access Control

Bypass Protection Mechanism

Demonstrative Examples

Below is a snippet from a Java properties file in which the LDAP server password is stored in plaintext.
Bad
webapp.ldap.username=secretUsernamewebapp.ldap.password=secretPassword

Mitigations & Prevention

Architecture and Design

Do not hardwire passwords into your software.

Architecture and Design

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

Frequently Asked Questions

What is CWE-555?

CWE-555 (J2EE Misconfiguration: Plaintext Password in Configuration File) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The J2EE application stores a plaintext password in a configuration file.

How can CWE-555 be exploited?

Attackers can exploit CWE-555 (J2EE Misconfiguration: Plaintext Password in Configuration File) to bypass protection mechanism. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.

How do I prevent CWE-555?

Key mitigations include: Do not hardwire passwords into your software.

What is the severity of CWE-555?

CWE-555 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.