CWE-522: Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
Last updated
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
Last updated
CWE-522 (Insufficiently Protected Credentials) is a class-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
1,238 recorded CVEs are caused by CWE-522 (Insufficiently Protected Credentials), including 5 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 281 new CWE-522 CVEs have been recorded so far in 2026 (96 in 2025).
Unauthenticated credential leak and business logic flaw in Kaseya VSA <= v9.5.6
Zyxel Multiple Products Use of Hard-Coded Credentials Vulnerability
Progress Telerik UI for ASP.NET AJAX and Sitefinity Cryptographic Weakness Vulnerability
Rockwell Multiple Products Insufficient Protected Credentials Vulnerability
Microsoft Windows Group Policy Preferences Password Privilege Escalation Vulnerability
Apache Juneau: REST client forwards credentials to a different origin when following HTTP redirects
Apache Storm Nimbus, Apache Storm Client: Disclosure of the Topology ZooKeeper Credential to Read-Only Users and to Logs
CWE‑522: Insufficiently Protected Credentials in web services in Progress Sitefinity
Coolify members can see private key of root user
Insufficiently Protected Credentials in Radiometrics VizAir
Insufficiently Protected Credentials
Cisco Identity Services Engine Hardening Release - Insuffiencently Protected Credential Vulnerabilities
Showing 12 of 1,238 recorded CWE-522 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat can happen when CWE-522 is exploited.
Gain Privileges or Assume Identity
Affects: Access Control
An attacker could gain access to user accounts and access sensitive data used by the user accounts.
Typically introduced during these phases of the software lifecycle.
Technologies
Practical mitigations for CWE-522, grouped by where in the lifecycle they apply.
Use an appropriate security mechanism to protect the credentials.
Make appropriate use of cryptography to protect the credentials.
Use industry standards to protect the credentials (e.g. LDAP, keystore, etc.).
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.)
Effectiveness: High
MITRE examples of the weakness in code.
This code changes a user's password.
Vulnerable example
$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.
Vulnerable example
...
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.
Vulnerable example
...
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.
Vulnerable example
int VerifyAdmin(char *password) {
if (strcmp(compress(password), compressed_password)) {
printf("Incorrect Password!\n");
return(0);
}
printf("Entering Diagnostic Mode...\n");
return(1);
}Vulnerable example
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.
Vulnerable example
# Java Web App ResourceBundle properties file
...
webapp.ldap.username=secretUsername
webapp.ldap.password=secretPassword
...Vulnerable example
...
<connectionStrings>
<add name="ud_DEV" connectionString="connectDB=uDB; uid=db2admin; pwd=password; dbalias=uDB;" providerName="System.Data.Odbc" />
</connectionStrings>
...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" [2]. 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.
Real CVEs that MITRE cites as examples of this weakness.
CAPEC attack patterns that exploit this weakness.
Common questions about CWE-522.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-522 CVE affects your products, with AI-written analysis and remediation steps.