COMMON WEAKNESS ENUMERATIONIncomplete

CWE-260

Password in Configuration File

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

Abstraction

Base

Structure

Simple

Likelihood of Exploit

Medium

Understand the problem

What is the problem?

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

Extended description

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.

Root cause

How and when does the problem arise?

Lifecycle phase

Architecture and Design

OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.

Lifecycle phase

Implementation

Risk

What does successful exploitation lead to?

Gain Privileges or Assume Identity

Affected security scopes: Access Control

Defence

How is it prevented and fixed?

Architecture and Design

Architecture and design approach

Detail
Avoid storing passwords in easily accessible locations.

Architecture and Design

Architecture and design approach

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

Verification

How is it detected?

Automated Static Analysis

High
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.)
CWE-260: Common Weakness Enumeration Entry CWE-260 · DayBreach Sözlük · DayBreach