The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.

Primary

Architecture and Design
COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.

Implementation

Access Control
Gain Privileges or Assume Identity
An attacker could gain access to user accounts and access sensitive data used by the user accounts.

Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
High

Architecture and Design
Use an appropriate security mechanism to protect the credentials.

Architecture and Design
Make appropriate use of cryptography to protect the credentials.

Implementation
Use industry standards to protect the credentials (e.g. LDAP, keystore, etc.).

This code changes a user's password.

$user = $_GET['user'];$pass = $_GET['pass'];$checkpass = $_GET['checkpass'];if ($pass == $checkpass) {SetUserPassword($user, $pass);}

While the code confirms that the requesting user typed the same new password twice, it does not confirm that the user requesting the password change is the same user whose password will be changed. An attacker can request a change of another user's password and gain control of the victim's account.

The following code reads a password from a properties file and uses the password to connect to a database.

...Properties prop = new Properties();prop.load(new FileInputStream("config.properties"));String password = prop.getProperty("password");DriverManager.getConnection(url, usr, password);...

This code will run successfully, but anyone who has access to config.properties can read the value of password. If a devious employee has access to this information, they can use it to break into the system.

The following code reads a password from the registry and uses the password to create a new network credential.

...String password = regKey.GetValue(passKey).toString();NetworkCredential netCred = new NetworkCredential(username,password,domain);...

This code will run successfully, but anyone who has access to the registry key used to store the password can read the value of password. If a devious employee has access to this information, they can use it to break into the system

Both of these examples verify a password by comparing it to a stored compressed version.

int VerifyAdmin(char *password) {if (strcmp(compress(password), compressed_password)) {printf("Incorrect Password!\n");return(0);}printf("Entering Diagnostic Mode...\n");return(1);}

int VerifyAdmin(String password) {if (passwd.Equals(compress(password), compressed_password)) {return(0);}
//Diagnostic Mode
return(1);}

Because a compression algorithm is used instead of a one way hashing algorithm, an attacker can recover compressed passwords stored in the database.

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 they are stored in cleartext.
This Java example shows a properties file with a cleartext username / password pair.

# Java Web App ResourceBundle properties file
...webapp.ldap.username=secretUsernamewebapp.ldap.password=secretPassword...

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 but the pair is stored in cleartext.

...<connectionStrings><add name="ud_DEV" connectionString="connectDB=uDB; uid=db2admin; pwd=password; dbalias=uDB;" providerName="System.Data.Odbc" /></connectionStrings>...

Username and password information should not be included in a configuration file or a properties file in cleartext as this will allow anyone who can read the file access to the resource. If possible, encrypt this information.

In 2022, the OT:ICEFALL study examined products by 10 different Operational Technology (OT) vendors. The researchers reported 56 vulnerabilities and said that the products were "insecure by design" [REF-1283]. If exploited, these vulnerabilities often allowed adversaries to change how the products operated, ranging from denial of service to changing the code that the products executed. Since these products were often used in industries such as power, electrical, water, and others, there could even be safety implications.
Multiple vendors used cleartext transmission or storage of passwords in their OT products.

CVE-2022-30018
A messaging platform serializes all elements of User/Group objects, making private information available to adversaries
https://www.cve.org/CVERecord?id=CVE-2022-30018

CVE-2022-29959
Initialization file contains credentials that can be decoded using a "simple string transformation"
https://www.cve.org/CVERecord?id=CVE-2022-29959

CVE-2022-35411
Python-based RPC framework enables pickle functionality by default, allowing clients to unpickle untrusted data.
https://www.cve.org/CVERecord?id=CVE-2022-35411

CVE-2022-29519
Programmable Logic Controller (PLC) sends sensitive information in plaintext, including passwords and session tokens.
https://www.cve.org/CVERecord?id=CVE-2022-29519

CVE-2022-30312
Building Controller uses a protocol that transmits authentication credentials in plaintext.
https://www.cve.org/CVERecord?id=CVE-2022-30312

CVE-2022-31204
Programmable Logic Controller (PLC) sends password in plaintext.
https://www.cve.org/CVERecord?id=CVE-2022-31204

CVE-2022-30275
Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext.
https://www.cve.org/CVERecord?id=CVE-2022-30275

CVE-2007-0681
Web app allows remote attackers to change the passwords of arbitrary users without providing the original password, and possibly perform other unauthorized actions.
https://www.cve.org/CVERecord?id=CVE-2007-0681

CVE-2000-0944
Web application password change utility doesn't check the original password.
https://www.cve.org/CVERecord?id=CVE-2000-0944

CVE-2005-3435
product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks.
https://www.cve.org/CVERecord?id=CVE-2005-3435

CVE-2005-0408
chain: product generates predictable MD5 hashes using a constant value combined with username, allowing authentication bypass.
https://www.cve.org/CVERecord?id=CVE-2005-0408

A7
Broken Authentication and Session Management
CWE More Specific

A3
Broken Authentication and Session Management
CWE More Specific

Allowed-with-Review
This CWE entry is a Class and might have Base-level children that would be more appropriate
Examine children of this entry to see if there is a better fit

Anonymous Tool Vendor (under NDA)
2006-07-19
Draft 3
2006-07-19

Eric Dalci
Cigital
2008-07-01
updated Potential_Mitigations, Time_of_Introduction

CWE Content Team
MITRE
2008-09-08
updated Relationships, Other_Notes, Taxonomy_Mappings

CWE Content Team
MITRE
2009-05-27
updated Related_Attack_Patterns

CWE Content Team
MITRE
2011-03-29
updated Relationships

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2012-10-30
updated Demonstrative_Examples, Potential_Mitigations

CWE Content Team
MITRE
2014-06-23
updated Other_Notes, Relationships

CWE Content Team
MITRE
2014-07-30
updated Relationships

CWE Content Team
MITRE
2017-05-03
updated Related_Attack_Patterns

CWE Content Team
MITRE
2017-11-08
updated Demonstrative_Examples, Modes_of_Introduction, Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2018-03-27
updated Relationships

CWE Content Team
MITRE
2019-01-03
updated Related_Attack_Patterns

CWE Content Team
MITRE
2019-06-20
updated Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2020-02-24
updated Description, Relationships, Type

CWE Content Team
MITRE
2020-08-20
updated Related_Attack_Patterns, Relationships

CWE Content Team
MITRE
2021-03-15
updated Demonstrative_Examples

CWE Content Team
MITRE
2021-07-20
updated Relationships

CWE Content Team
MITRE
2021-10-28
updated Relationships

CWE Content Team
MITRE
2022-10-13
updated Demonstrative_Examples, Observed_Examples, References, Relationships

CWE Content Team
MITRE
2023-01-31
updated Applicable_Platforms, Observed_Examples, Relationships

CWE Content Team
MITRE
2023-04-27
updated Detection_Factors, Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2023-10-26
updated Observed_Examples

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Applicable_Platforms, Relationships, Weakness_Ordinalities