| Impact | Details |
|---|---|
|
Read Application Data |
Scope: Confidentiality
An attacker with access to the system could read sensitive information stored in cleartext (i.e., unencrypted). Even if the information is encoded in a way that is not human-readable, certain techniques could determine which encoding is being used, then decode the information.
|
| Phase(s) | Mitigation |
|---|---|
|
Implementation; System Configuration; Operation |
|
|
Implementation; System Configuration; Operation |
In some systems/environments such as cloud, the use of "double encryption" (at both the software and hardware layer) might be required, and the developer might be solely responsible for both layers, instead of shared responsibility with the administrator of the broader system/environment.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 311 | Missing Encryption of Sensitive Data |
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 922 | Insecure Storage of Sensitive Information |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 313 | Cleartext Storage in a File or on Disk |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 314 | Cleartext Storage in the Registry |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 315 | Cleartext Storage of Sensitive Information in a Cookie |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 316 | Cleartext Storage of Sensitive Information in Memory |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 317 | Cleartext Storage of Sensitive Information in GUI |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 318 | Cleartext Storage of Sensitive Information in Executable |
| ParentOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 526 | Cleartext Storage of Sensitive Information in an Environment Variable |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 199 | Information Management Errors |
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 311 | Missing Encryption of Sensitive Data |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1013 | Encrypt Data |
| Phase | Note |
|---|---|
| Architecture and Design | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |
Class: Not Language-Specific (Undetermined Prevalence)
Class: Cloud Computing (Undetermined Prevalence)
Class: ICS/OT (Undetermined Prevalence)
Class: Mobile (Undetermined Prevalence)
Example 1
The following code excerpt stores a plaintext user account ID in a browser cookie.
Because the account ID is in plaintext, the user's account information is exposed if their computer is compromised by an attacker.
Example 2
This code writes a user's login information to a cookie so the user does not have to login again later.
The code stores the user's username and password in plaintext in a cookie on the user's machine. This exposes the user's login information if their computer is compromised by an attacker. Even if the user's machine is not compromised, this weakness combined with cross-site scripting (CWE-79) could allow an attacker to remotely copy the cookie.
Also note this example code also exhibits Plaintext Storage in a Cookie (CWE-315).
Example 3
The following code attempts to establish a connection, read in a password, then store it to a buffer.
While successful, the program does not encrypt the data before writing it to a buffer, possibly exposing it to unauthorized actors.
Example 4
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.
This Java example shows a properties file with a cleartext username / password pair.
The following example shows a portion of a configuration file for an ASP.Net application. This configuration file includes username and password information for a connection to a database but the pair is stored in cleartext.
Username and password information should not be included in a configuration file or a properties file in cleartext as this will allow anyone who can read the file access to the resource. If possible, encrypt this information.
Example 5
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.
Example 6
In 2021, a web site operated by PeopleGIS stored data of US municipalities in Amazon Web Service (AWS) Simple Storage Service (S3) buckets.
While it was not publicly disclosed how the data was protected after discovery, multiple options could have been considered.
Example 7
Consider the following PowerShell command examples for encryption scopes of Azure storage objects. In the first example, an encryption scope is set for the storage account.
The result (edited and formatted for readability) might be:
| Name | State | Source | RequireInfrastructureEncryption |
|---|---|---|---|
| testscope | Enabled | Microsoft.Storage |
However, the empty string under RequireInfrastructureEncryption indicates this service was not enabled at the time of creation, because the -RequireInfrastructureEncryption argument was not specified in the command.
Including the -RequireInfrastructureEncryption argument addresses the issue:
This produces the report:
| Name | State | Source | RequireInfrastructureEncryption |
|---|---|---|---|
| testscope | Enabled | Microsoft.Keyvault | True |
In a scenario where both software and hardware layer encryption is required ("double encryption"), Azure's infrastructure encryption setting can be enabled via the CLI or Portal. An important note is that infrastructure hardware encryption cannot be enabled or disabled after a blob is created. Furthermore, the default value for infrastructure encryption is disabled in blob creations.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext.
|
|
|
password and username stored in cleartext in a cookie
|
|
|
password stored in cleartext in a file with insecure permissions
|
|
|
chat program disables SSL in some circumstances even when the user says to use SSL.
|
|
|
Chain: product uses an incorrect public exponent when generating an RSA key, which effectively disables the encryption
|
|
|
storage of unencrypted passwords in a database
|
|
|
storage of unencrypted passwords in a database
|
|
|
product stores a password in cleartext in memory
|
|
|
storage of a secret key in cleartext in a temporary file
|
|
|
SCADA product uses HTTP Basic Authentication, which is not encrypted
|
|
|
login credentials stored unencrypted in a registry key
|
|
|
Plaintext credentials in world-readable file.
|
|
|
Password in cleartext in config file.
|
|
|
Password in cleartext in config file.
|
|
|
Decrypted copy of a message written to disk given a combination of options and when user replies to an encrypted message.
|
|
|
Plaintext storage of private key and passphrase in log file when user imports the key.
|
|
|
Admin password in plaintext in a cookie.
|
|
|
Default configuration has cleartext usernames/passwords in cookie.
|
|
|
Usernames/passwords in cleartext in cookies.
|
|
|
Authentication information stored in cleartext in a cookie.
|
| Method | Details |
|---|---|
|
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 |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 816 | OWASP Top Ten 2010 Category A7 - Insecure Cryptographic Storage |
| MemberOf | ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 884 | CWE Cross-section |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 934 | OWASP Top Ten 2013 Category A6 - Sensitive Data Exposure |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 963 | SFP Secondary Cluster: Exposed Data |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1029 | OWASP Top Ten 2017 Category A3 - Sensitive Data Exposure |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1348 | OWASP Top Ten 2021 Category A04:2021 - Insecure Design |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1366 | ICS Communications: Frail Security in Protocols |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1368 | ICS Dependencies (& Architecture): External Digital Systems |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1402 | Comprehensive Categorization: Encryption |
Rationale
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.Comments
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.Terminology
Other
| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| PLOVER | Plaintext Storage of Sensitive Information | ||
| Software Fault Patterns | SFP23 | Exposed Data | |
| ISA/IEC 62443 | Part 4-2 | Req CR 4.1 a) | |
| ISA/IEC 62443 | Part 3-3 | Req SR 4.1 |
| CAPEC-ID | Attack Pattern Name |
|---|---|
| CAPEC-37 | Retrieve Embedded Sensitive Data |
| Submissions | |||
|---|---|---|---|
| Submission Date | Submitter | Organization | |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
PLOVER | ||
| Contributions | |||
| Contribution Date | Contributor | Organization | |
| 2023年04月25日 | "Mapping CWE to 62443" Sub-Working Group | CWE-CAPEC ICS/OT SIG | |
| Suggested mappings to ISA/IEC 62443. | |||
| Modifications | |||
| Modification Date | Modifier | Organization | |
|
2025年04月03日
(CWE 4.17, 2025年04月03日) |
CWE Content Team | MITRE | |
| updated Common_Consequences, Description, Diagram, Other_Notes, Potential_Mitigations | |||
|
2024年02月29日
(CWE 4.14, 2024年02月29日) |
CWE Content Team | MITRE | |
| updated Taxonomy_Mappings | |||
| 2023年06月29日 | CWE Content Team | MITRE | |
| updated Mapping_Notes, Relationships | |||
| 2023年04月27日 | CWE Content Team | MITRE | |
| updated Detection_Factors, References, Relationships, Taxonomy_Mappings | |||
| 2023年01月31日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Demonstrative_Examples, Description, References, Relationships | |||
| 2022年10月13日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Demonstrative_Examples, Description, Observed_Examples, Potential_Mitigations, References | |||
| 2021年10月28日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2021年03月15日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples | |||
| 2020年02月24日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Relationships | |||
| 2019年06月20日 | CWE Content Team | MITRE | |
| updated Relationships, Type | |||
| 2018年03月27日 | CWE Content Team | MITRE | |
| updated References, Relationships, Type | |||
| 2018年01月23日 | CWE Content Team | MITRE | |
| updated Abstraction, Relationships | |||
| 2017年11月08日 | CWE Content Team | MITRE | |
| updated Modes_of_Introduction, References, Relationships | |||
| 2017年05月03日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns | |||
| 2014年07月30日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Relationships, Taxonomy_Mappings | |||
| 2013年07月17日 | CWE Content Team | MITRE | |
| updated Description, Relationships, Terminology_Notes | |||
| 2013年02月21日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, References | |||
| 2012年05月11日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Demonstrative_Examples, Observed_Examples, References, Related_Attack_Patterns, Relationships | |||
| 2011年06月01日 | CWE Content Team | MITRE | |
| updated Common_Consequences | |||
| 2010年06月21日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2010年02月16日 | CWE Content Team | MITRE | |
| updated References | |||
| 2009年01月12日 | CWE Content Team | MITRE | |
| updated Description, Name | |||
| 2008年09月08日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2008年07月01日 | Eric Dalci | Cigital | |
| updated Time_of_Introduction | |||
| Previous Entry Names | |||
| Change Date | Previous Entry Name | ||
| 2009年01月12日 | Plaintext Storage of Sensitive Information | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.