---
title: "CWE-260: Password in Configuration File"
url: https://radicalnotion.ai/cwe/cwe-260
type: cwe
description: "The product stores a password in a configuration file that might be accessible to actors who do not know the password."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-260: Password in Configuration File

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 25
- **Of those, in CISA KEV:** 0
- **New in 2026:** 1
- **CWE catalog version:** 4.21

## Description

The product stores a password in a configuration file that might be accessible to actors who do not know the password.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Gain Privileges or Assume Identity | This can result in compromise of the system for which the password is used. An attacker could gain access to this file and learn the stored password or worse yet, change the password to one of their choosing. |

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

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

Below is a snippet from a Java properties file.

Bad code:

```java
webapp.ldap.username = secretUsername
webapp.ldap.password = secretPassword
```

Because the LDAP credentials are stored in plaintext, anyone with access to the file can gain access to the resource.

### Example 2

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

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-38665 | A continuous delivery pipeline management tool stores an unencypted password in a configuration file. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2023-53739 | Tinycontrol LAN Controller v3 LK3 1.58a Unauthenticated Configuration Backup Disclosure | critical | 9.9 | - | No | 2025-12-09 |
| CVE-2025-57754 | eslint-ban-moment exposed a sensitive Supabase URI in .env (Credential leak) | critical | 9.8 | - | No | 2025-08-21 |
| CVE-2023-34128 | - | critical | 9.8 | - | No | 2023-07-13 |
| CVE-2016-7043 | Password in config file in KIE server | critical | 9.8 | - | No | 2019-05-15 |
| CVE-2017-7925 | Password in Configuration File in Dahua Technology Co., Ltd Digital Video Recorders and IP Cameras | critical | 9.8 | - | No | 2017-05-06 |
| CVE-2025-25022 | IBM QRadar Suite Software and IBM Cloud Pak for Security information disclosure | critical | 9.6 | - | No | 2025-06-03 |
| CVE-2025-6513 | BRAIN2 Configuration file for database access not sufficiently secured | critical | 9.3 | - | No | 2025-06-23 |
| CVE-2019-3780 | Cloud Foundry Container Runtime Leaks IAAS Credentials | high | 8.8 | - | No | 2019-03-08 |
| CVE-2017-7923 | Password in Configuration File in Hikvision Cameras | high | 8.8 | - | No | 2017-05-06 |
| CVE-2019-25465 | Hisilicon HiIpcam V100R003 Information Disclosure via Directory Traversal | high | 8.7 | - | No | 2026-03-11 |
| CVE-2023-53770 | MiniDVBLinux 5.4 Unauthenticated Configuration Download via Backup Endpoint | high | 8.7 | - | No | 2025-12-09 |
| CVE-2025-32111 | - | high | 8.7 | - | No | 2025-04-04 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-522](https://radicalnotion.ai/cwe/cwe-522) | Insufficiently Protected Credentials |
| Child | [CWE-13](https://radicalnotion.ai/cwe/cwe-13) | ASP.NET Misconfiguration: Password in Configuration File |
| Child | [CWE-258](https://radicalnotion.ai/cwe/cwe-258) | Empty Password in Configuration File |
| Child | [CWE-555](https://radicalnotion.ai/cwe/cwe-555) | J2EE Misconfiguration: Plaintext Password in Configuration File |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Password Management: Password in Configuration File | - | - |

## Frequently asked questions

### What is CWE-260?

The product stores a password in a configuration file that might be accessible to actors who do not know the password.

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

25 recorded CVEs are attributed to CWE-260, including CVE-2023-53739, CVE-2025-57754 and CVE-2023-34128.

### How do you prevent CWE-260?

Avoid storing passwords in easily accessible locations.

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

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

### Is CWE-260 actively exploited?

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

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

---

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