---
title: "CWE-256: Plaintext Storage of a Password"
url: https://radicalnotion.ai/cwe/cwe-256
type: cwe
description: "The product stores a password in plaintext within resources such as memory or files."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-256: Plaintext Storage of a Password

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** High
- **CVEs with this as primary weakness:** 231
- **Of those, in CISA KEV:** 0
- **New in 2026:** 60
- **CWE catalog version:** 4.21

## Description

The product stores a password in plaintext within resources such as memory or files.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |
| Architecture and Design | Developers sometimes believe that they cannot defend the application from someone who has access to the configuration, but this belief makes an attacker's job easier. |

## Applicable platforms

**Technologies:** ICS/OT (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Gain Privileges or Assume Identity | Storing a plaintext password in a configuration file allows anyone who can read the file to access the password-protected resource. In some contexts, even storage of a plaintext password in memory is considered a security risk if the password is not cleared immediately after it is used. |

## Potential mitigations

### Architecture and Design

Avoid storing passwords in easily accessible locations.

### Architecture and Design

Consider storing cryptographic hashes of passwords as an alternative to storing in plaintext.

### Mitigation

A programmer might attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password because the encoding can be detected and decoded easily.

Effectiveness: None

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

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 2

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 3

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 4

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.

At least one OT product stored a password in plaintext.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-30275 | Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext. |

## Real CVEs with this weakness (sample of 12 of 231)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2020-6961 | Plaintext Storage of a Password in GE CARESCAPE, ApexPro, and Clinical Information Center systems | critical | 10.0 | - | No | 2020-01-24 |
| CVE-2024-55026 | - | critical | 9.8 | - | No | 2026-03-03 |
| CVE-2025-15113 | Ksenia Security lares Home Automation 1.6 Remote Code Execution via MPFS Upload | critical | 9.8 | - | No | 2025-12-30 |
| CVE-2025-27656 | - | critical | 9.8 | - | No | 2025-03-05 |
| CVE-2025-27662 | - | critical | 9.8 | - | No | 2025-03-05 |
| CVE-2024-5960 | Plaintext Storage of a Password in Eliz Software's Panel | critical | 9.8 | - | No | 2024-09-18 |
| CVE-2024-33375 | - | critical | 9.8 | - | No | 2024-06-14 |
| CVE-2024-23486 | - | critical | 9.8 | - | No | 2024-04-15 |
| CVE-2023-42493 | EisBaer Scada - CWE-256: Plaintext Storage of a Password | critical | 9.8 | - | No | 2023-10-25 |
| CVE-2023-26204 | - | critical | 9.8 | - | No | 2023-06-13 |
| CVE-2017-16714 | Plaintext Storage of a Password in Ice Qube Thermal Management Center | critical | 9.8 | - | No | 2018-09-06 |
| CVE-2018-8851 | Plaintext Storage of a Password in Echelon SmartServer 1, SmartServer 2, SmartServer 3, i.LON 100, i.LON 600 | critical | 9.8 | - | No | 2018-07-24 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-522](https://radicalnotion.ai/cwe/cwe-522) | Insufficiently Protected Credentials |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Password Management | - | - |
| Software Fault Patterns | Exposed Data | SFP23 | - |
| ISA/IEC 62443 | Req CR 1.5 | Part 4-2 | - |
| ISA/IEC 62443 | Req SR 1.5 | Part 3-3 | - |

## Frequently asked questions

### What is CWE-256?

The product stores a password in plaintext within resources such as memory or files.

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

231 recorded CVEs are attributed to CWE-256, including CVE-2020-6961, CVE-2024-55026 and CVE-2025-15113.

### How do you prevent CWE-256?

Avoid storing passwords in easily accessible locations.

### How is CWE-256 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-256?

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

### Is CWE-256 actively exploited?

231 recorded CVEs are caused by CWE-256; none are currently in CISA's KEV catalog of actively exploited flaws.

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

---

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