---
title: "CWE-522: Insufficiently Protected Credentials"
url: https://radicalnotion.ai/cwe/cwe-522
type: cwe
description: "The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-522: Insufficiently Protected Credentials

- **Abstraction:** Class
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 1,234
- **Of those, in CISA KEV:** 5
- **New in 2026:** 277
- **CWE catalog version:** 4.21

## Description

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

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |
| Implementation | - |

## Applicable platforms

**Technologies:** Web Based (Undetermined), ICS/OT (Undetermined)

## Common consequences

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

## Potential mitigations

### 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.).

## Detection methods

### 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.)

Effectiveness: High

## Demonstrative examples

### Example 1

This code changes a user's password.

Bad code:

```php
$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.

### Example 2

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

Bad code:

```java
...
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.

### Example 3

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

Bad code:

```java
...
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

### Example 4

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

Bad code:

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

Bad code:

```java
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.

### Example 5

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.

Bad code:

```java
# Java Web App ResourceBundle properties file
...
webapp.ldap.username=secretUsername
webapp.ldap.password=secretPassword
...
```

Bad code:

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

### Example 6

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.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-30018 | A messaging platform serializes all elements of User/Group objects, making private information available to adversaries |
| CVE-2022-29959 | Initialization file contains credentials that can be decoded using a "simple string transformation" |
| CVE-2022-35411 | Python-based RPC framework enables pickle functionality by default, allowing clients to unpickle untrusted data. |
| CVE-2022-29519 | Programmable Logic Controller (PLC) sends sensitive information in plaintext, including passwords and session tokens. |
| CVE-2022-30312 | Building Controller uses a protocol that transmits authentication credentials in plaintext. |
| CVE-2022-31204 | Programmable Logic Controller (PLC) sends password in plaintext. |
| CVE-2022-30275 | Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext. |
| 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. |
| CVE-2000-0944 | Web application password change utility doesn't check the original password. |
| CVE-2005-3435 | product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks. |
| CVE-2005-0408 | Chain: product generates predictable MD5 hashes using a constant value combined with username, allowing authentication bypass. |

## Real CVEs with this weakness (sample of 12 of 1,234)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2021-30116 | Unauthenticated credential leak and business logic flaw in Kaseya VSA \<= v9.5.6 | critical | 10.0 | - | Yes | 2021-07-09 |
| CVE-2020-29583 | Zyxel Multiple Products Use of Hard-Coded Credentials Vulnerability | critical | 10.0 | - | Yes | 2020-12-22 |
| CVE-2017-9248 | Progress Telerik UI for ASP.NET AJAX and Sitefinity Cryptographic Weakness Vulnerability | critical | 10.0 | - | Yes | 2017-07-03 |
| CVE-2021-22681 | Rockwell Multiple Products Insufficient Protected Credentials Vulnerability | critical | 9.3 | - | Yes | 2021-03-03 |
| CVE-2014-1812 | Microsoft Windows Group Policy Preferences Password Privilege Escalation Vulnerability | high | 8.5 | - | Yes | 2014-05-14 |
| CVE-2026-73116 | Apache Juneau: REST client forwards credentials to a different origin when following HTTP redirects | critical | 10.0 | - | No | 2026-11-05 |
| CVE-2026-82434 | Apache Storm Nimbus, Apache Storm Client: Disclosure of the Topology ZooKeeper Credential to Read-Only Users and to Logs | critical | 10.0 | - | No | 2026-09-14 |
| CVE-2026-7312 | CWE‑522: Insufficiently Protected Credentials in web services in Progress Sitefinity | critical | 10.0 | - | No | 2026-06-02 |
| CVE-2025-64420 | Coolify members can see private key of root user | critical | 10.0 | - | No | 2026-01-05 |
| CVE-2025-54863 | Insufficiently Protected Credentials in Radiometrics VizAir | critical | 10.0 | - | No | 2025-11-04 |
| CVE-2024-12799 | Insufficiently Protected Credentials | critical | 10.0 | - | No | 2025-03-05 |
| CVE-2026-20234 | Cisco Identity Services Engine Hardening Release - Insuffiencently Protected Credential Vulnerabilities | critical | 9.9 | - | No | 2026-09-16 |

## Related attack patterns (CAPEC)

- [CAPEC-102](https://radicalnotion.ai/capec/capec-102): Session Sidejacking
- [CAPEC-474](https://radicalnotion.ai/capec/capec-474): Signature Spoofing by Key Theft
- [CAPEC-50](https://radicalnotion.ai/capec/capec-50): Password Recovery Exploitation
- [CAPEC-509](https://radicalnotion.ai/capec/capec-509): Kerberoasting
- [CAPEC-551](https://radicalnotion.ai/capec/capec-551): Modify Existing Service
- [CAPEC-555](https://radicalnotion.ai/capec/capec-555): Remote Services with Stolen Credentials
- [CAPEC-560](https://radicalnotion.ai/capec/capec-560): Use of Known Domain Credentials
- [CAPEC-561](https://radicalnotion.ai/capec/capec-561): Windows Admin Shares with Stolen Credentials
- [CAPEC-600](https://radicalnotion.ai/capec/capec-600): Credential Stuffing
- [CAPEC-644](https://radicalnotion.ai/capec/capec-644): Use of Captured Hashes (Pass The Hash)
- [CAPEC-645](https://radicalnotion.ai/capec/capec-645): Use of Captured Tickets (Pass The Ticket)
- [CAPEC-652](https://radicalnotion.ai/capec/capec-652): Use of Known Kerberos Credentials
- [CAPEC-653](https://radicalnotion.ai/capec/capec-653): Use of Known Operating System Credentials

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-287](https://radicalnotion.ai/cwe/cwe-287) | Improper Authentication |
| Parent | [CWE-668](https://radicalnotion.ai/cwe/cwe-668) | Exposure of Resource to Wrong Sphere |
| Parent | [CWE-1390](https://radicalnotion.ai/cwe/cwe-1390) | Weak Authentication |
| Child | [CWE-256](https://radicalnotion.ai/cwe/cwe-256) | Plaintext Storage of a Password |
| Child | [CWE-257](https://radicalnotion.ai/cwe/cwe-257) | Storing Passwords in a Recoverable Format |
| Child | [CWE-260](https://radicalnotion.ai/cwe/cwe-260) | Password in Configuration File |
| Child | [CWE-261](https://radicalnotion.ai/cwe/cwe-261) | Weak Encoding for Password |
| Child | [CWE-523](https://radicalnotion.ai/cwe/cwe-523) | Unprotected Transport of Credentials |
| Child | [CWE-549](https://radicalnotion.ai/cwe/cwe-549) | Missing Password Field Masking |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| OWASP Top Ten 2007 | Broken Authentication and Session Management | A7 | CWE More Specific |
| OWASP Top Ten 2004 | Broken Authentication and Session Management | A3 | CWE More Specific |

## Frequently asked questions

### What is CWE-522?

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

### What CVEs are caused by CWE-522?

1,234 recorded CVEs are attributed to CWE-522, including CVE-2021-30116, CVE-2020-29583 and CVE-2017-9248. 5 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### Is CWE-522 part of the OWASP Top 10?

CWE-522 maps to OWASP Top Ten 2007: Broken Authentication and Session Management (A7) in the OWASP security taxonomy.

### How do you prevent CWE-522?

Use an appropriate security mechanism to protect the credentials.

### How is CWE-522 detected?

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.)

### What are the consequences of CWE-522?

Exploiting CWE-522 can lead to: Gain Privileges or Assume Identity.

### Is CWE-522 actively exploited?

Yes. 5 CWE-522 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 1,234 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/522.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-522). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
