CWE-311: Missing Encryption of Sensitive Data
The product does not encrypt sensitive or critical information before storage or transmission.
Last updated
Overview
CWE-311 (Missing Encryption of Sensitive Data) is a class-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
292 recorded CVEs are caused by CWE-311 (Missing Encryption of Sensitive Data). The highest-severity and most recent are shown first. 8 new CWE-311 CVEs have been recorded so far in 2026 (38 in 2025).
- CVE-2023-6339
Google Nest WiFi Pro root code-execution & user-data compromise
Critical · CVSS 10.0 · EPSS 8th2024-01-02 - CVE-2020-35168Critical · CVSS 9.8 · EPSS 38th2022-07-11
- CVE-2019-6526Critical · CVSS 9.8 · EPSS 59th2019-04-12
- CVE-2018-16879Critical · CVSS 9.8 · EPSS 62th2019-01-03
- CVE-2018-17915Critical · CVSS 9.8 · EPSS 61th2018-10-10
- CVE-2018-7498Critical · CVSS 9.8 · EPSS 47th2018-03-28
- CVE-2017-9632Critical · CVSS 9.8 · EPSS 38th2017-08-07
- CVE-2025-36751
Missing encryption on Local Configuration Interface or Cloud Endpoint Communication - Growatt MIC3300TL-X and ShineLan-X
Critical · CVSS 9.4 · EPSS 0th2025-12-13 - CVE-2024-29151Critical · CVSS 9.1 · EPSS 24th2024-03-18
- CVE-2023-38699Critical · CVSS 9.1 · EPSS 15th2023-08-04
- CVE-2021-27779Critical · CVSS 9.1 · EPSS 42th2022-05-25
- CVE-2020-12032Critical · CVSS 9.1 · EPSS 57th2020-06-29
Showing 12 of 292 recorded CWE-311 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-311 vulnerabilitiesCommon consequences
What can happen when CWE-311 is exploited.
Read Application Data
Affects: Confidentiality
If the application does not use a secure channel, such as SSL, to exchange sensitive information, it is possible for an attacker with access to the network traffic to sniff packets from the connection and uncover the data. This attack is not technically difficult, but does require physical access to some portion of the network over which the sensitive data travels. This access is usually somewhere near where the user is connected to the network (such as a colleague on the company network) but can be anywhere along the path from the user to the end server.
Modify Application Data
Affects: Confidentiality, Integrity
Omitting the use of encryption in any program which transfers data over a network of any kind should be considered on par with delivering the data sent to each user on the local networks of both the sender and receiver. Worse, this omission allows for the injection of data into a stream of communication between two parties -- with no means for the victims to separate valid data from invalid. In this day of widespread network attacks and password collection sniffers, it is an unnecessary risk to omit encryption from the design of any system which might benefit from it.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-311, grouped by where in the lifecycle they apply.
Clearly specify which data or resources are valuable enough that they should be protected by encryption. Require that any transmission or storage of this data/resource should use well-vetted encryption algorithms.
Ensure that encryption is properly integrated into the system design, including but not necessarily limited to:
Identify the separate needs and contexts for encryption:
Using threat modeling or other techniques, assume that data can be compromised through a separate vulnerability or weakness, and determine where encryption will be most effective. Ensure that data that should be private is not being inadvertently exposed using weaknesses such as insecure permissions (CWE-732). [REF-7]
When there is a need to store or transmit sensitive data, use strong, up-to-date cryptographic algorithms to encrypt that data. Select a well-vetted algorithm that is currently considered to be strong by experts in the field, and use well-tested implementations. As with all cryptographic mechanisms, the source code should be available for analysis.
For example, US government systems require FIPS 140-2 certification.
Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. Reverse engineering techniques are mature. If the algorithm can be compromised if attackers find out how it works, then it is especially weak.
Periodically ensure that the cryptography has not become obsolete. Some older algorithms, once thought to require a billion years of computing time, can now be broken in days or hours. This includes MD4, MD5, SHA1, DES, and other algorithms that were once regarded as strong. [REF-267]
Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area.
Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.
Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
Effectiveness: Defense in Depth — This makes it easier to spot places in the code where data is being used that is unencrypted.
How to detect it
Manual Analysis
The characterizaton of sensitive data often requires domain-specific understanding, so manual methods are useful. However, manual efforts might not achieve desired code coverage within limited time constraints. Black box methods may produce artifacts (e.g. stored data or unencrypted network transfer) that require manual evaluation.
Effectiveness: High
Automated Analysis
Automated measurement of the entropy of an input/output source may indicate the use or lack of encryption, but human analysis is still required to distinguish intentionally-unencrypted data (e.g. metadata) from sensitive data.
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: SOAR Partial
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: SOAR Partial
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
This code writes a user's login information to a cookie so the user does not have to login again later.
Vulnerable example
function persistLogin($username, $password){The following code attempts to establish a connection, read in a password, then store it to a buffer.
Vulnerable example
server.sin_family = AF_INET; hp = gethostbyname(argv[1]);While successful, the program does not encrypt the data before writing it to a buffer, possibly exposing it to unauthorized actors.
The following code attempts to establish a connection to a site to communicate sensitive information.
Vulnerable example
try {Though a connection is successfully made, the connection is unencrypted and it is possible that all sensitive data sent to or received from the server will be read by unintended actors.
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2022-26390 — wireless battery product stores credentials and Personal Health Information (PHI) without encryption
- CVE-2009-2272 — password and username stored in cleartext in a cookie
- CVE-2009-1466 — password stored in cleartext in a file with insecure permissions
- CVE-2009-0152 — chat program disables SSL in some circumstances even when the user says to use SSL.
- CVE-2009-1603 — Chain: product uses an incorrect public exponent when generating an RSA key, which effectively disables the encryption
- CVE-2009-0964 — storage of unencrypted passwords in a database
- CVE-2008-6157 — storage of unencrypted passwords in a database
- CVE-2008-6828 — product stores a password in cleartext in memory
- CVE-2008-1567 — storage of a secret key in cleartext in a temporary file
- CVE-2008-0174 — SCADA product uses HTTP Basic Authentication, which is not encrypted
- CVE-2007-5778 — login credentials stored unencrypted in a registry key
- CVE-2002-1949 — Passwords transmitted in cleartext.
- CVE-2008-4122 — Chain: Use of HTTPS cookie without "secure" flag causes it to be transmitted across unencrypted HTTP.
- CVE-2008-3289 — Product sends password hash in cleartext in violation of intended policy.
- CVE-2008-4390 — Remote management feature sends sensitive information including passwords in cleartext.
- CVE-2007-5626 — Backup routine sends password in cleartext in email.
- CVE-2004-1852 — Product transmits Blowfish encryption key in cleartext.
- CVE-2008-0374 — Printer sends configuration information, including administrative password, in cleartext.
- CVE-2007-4961 — Chain: cleartext transmission of the MD5 hash of password enables attacks against a server that is susceptible to replay (CWE-294).
- CVE-2007-4786 — Product sends passwords in cleartext to a log server.
- CVE-2005-3140 — Product sends file with cleartext passwords in e-mail message intended for diagnostic purposes.
Terminology & mappings
Mapped taxonomies
- CLASP: Failure to encrypt data
- OWASP Top Ten 2007: Insecure Cryptographic Storage (A8) — CWE More Specific fit
- OWASP Top Ten 2007: Insecure Communications (A9) — CWE More Specific fit
- OWASP Top Ten 2004: Insecure Storage (A8) — CWE More Specific fit
- WASC: Insufficient Transport Layer Protection (4)
- The CERT Oracle Secure Coding Standard for Java (2011): Use SSLSocket rather than Socket for secure data exchange (MSC00-J)
- Software Fault Patterns: Exposed Data (SFP23)
- ISA/IEC 62443: Req SR 4.1 (Part 3-3)
- ISA/IEC 62443: Req SR 4.3 (Part 3-3)
- ISA/IEC 62443: Req CR 4.1 (Part 4-2)
- ISA/IEC 62443: Req CR 7.3 (Part 4-2)
- ISA/IEC 62443: Req CR 1.5 (Part 4-2)
Attack patterns
CAPEC attack patterns that exploit this weakness.
- CAPEC-157: Sniffing Attacks
- CAPEC-158: Sniffing Network Traffic
- CAPEC-204: Lifting Sensitive Data Embedded in Cache
- CAPEC-31: Accessing/Intercepting/Modifying HTTP Cookies
- CAPEC-37: Retrieve Embedded Sensitive Data
- CAPEC-383: Harvesting Information via API Event Monitoring
- CAPEC-384: Application API Message Manipulation via Man-in-the-Middle
- CAPEC-385: Transaction or Event Tampering via Application API Manipulation
- CAPEC-386: Application API Navigation Remapping
- CAPEC-387: Navigation Remapping To Propagate Malicious Content
- CAPEC-388: Application API Button Hijacking
- CAPEC-477: Signature Spoofing by Mixing Signed and Unsigned Content
- CAPEC-609: Cellular Traffic Intercept
- CAPEC-65: Sniff Application Code
Frequently asked questions
Common questions about CWE-311.
- What is CWE-311?
- The product does not encrypt sensitive or critical information before storage or transmission.
- What CVEs are caused by CWE-311?
- 292 recorded CVEs are attributed to CWE-311, including CVE-2023-6339, CVE-2020-35168, CVE-2019-6526.
- Is CWE-311 part of the OWASP Top 10?
- CWE-311 maps to OWASP Top Ten 2007: Insecure Cryptographic Storage (A8) in the OWASP security taxonomy.
- How do you prevent CWE-311?
- Clearly specify which data or resources are valuable enough that they should be protected by encryption. Require that any transmission or storage of this data/resource should use well-vetted encryption algorithms.
- How is CWE-311 detected?
- Manual Analysis: The characterizaton of sensitive data often requires domain-specific understanding, so manual methods are useful. However, manual efforts might not achieve desired code coverage within limited time constraints. Black box methods may produce artifacts (e.g. stored data or unencrypted network transfer) that require manual evaluation.
- What are the consequences of CWE-311?
- Exploiting CWE-311 can lead to: Read Application Data, Modify Application Data.
- Is CWE-311 actively exploited?
- 292 recorded CVEs are caused by CWE-311; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-311) (opens in a new tab)
- CWE-311 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-311
Get alerted the moment a new CWE-311 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.