CWE-311: Missing Encryption of Sensitive Data
The product does not encrypt sensitive or critical information before storage or transmission.
Last updated
The product does not encrypt sensitive or critical information before storage or transmission.
Last updated
469 recorded CVEs are caused by CWE-311 (Missing Encryption of Sensitive Data), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 31 new CWE-311 CVEs have been recorded so far in 2026 (37 in 2025).
Apache Tomcat: Fix for CVE-2026-29146 allowed bypass of EncryptInterceptor
Google Nest WiFi Pro root code-execution & user-data compromise
Cisco RoomOS Security Hardening Release - Missing Encryption Vulnerabilities
Nginx UI: Unauthenticated Backup Download with Encryption Key Disclosure
Cleartext Transmission of Sensitive Information in Moxa AWK-3121
Cleartext Transmission of Sensitive Information in PHOENIX CONTACT FL SWITCH
Showing 12 of 469 recorded CWE-311 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat 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.
Typically introduced during these phases of the software lifecycle.
Languages
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). [2]
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. [6]
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.
The characterization 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 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.
According to SOAR [7], the following detection techniques may be useful:
Cost effective for partial coverage:
Effectiveness: SOAR Partial
According to SOAR [7], the following detection techniques may be useful:
Cost effective for partial coverage:
Effectiveness: SOAR Partial
According to SOAR [7], the following detection techniques may be useful:
Highly cost effective:
Cost effective for partial coverage:
Effectiveness: High
According to SOAR [7], the following detection techniques may be useful:
Highly cost effective:
Effectiveness: High
According to SOAR [7], the following detection techniques may be useful:
Cost effective for partial coverage:
Effectiveness: SOAR Partial
According to SOAR [7], the following detection techniques may be useful:
Highly cost effective:
Cost effective for partial coverage:
Effectiveness: High
MITRE examples of the weakness 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){
$data = array("username" => $username, "password"=> $password);
setcookie ("userdata", $data);
}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]);
if (hp==NULL) error("Unknown host");
memcpy( (char *)&server.sin_addr,(char *)hp->h_addr,hp->h_length);
if (argc < 3) port = 80;
else port = (unsigned short)atoi(argv[3]);
server.sin_port = htons(port);
if (connect(sock, (struct sockaddr *)&server, sizeof server) < 0) error("Connecting");
...
while ((n=read(sock,buffer,BUFSIZE-1))!=-1) {
write(dfd,password_buffer,n);
...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 {
URL u = new URL("http://www.secret.example.org/");
HttpURLConnection hu = (HttpURLConnection) u.openConnection();
hu.setRequestMethod("PUT");
hu.connect();
OutputStream os = hu.getOutputStream();
hu.disconnect();
}
catch (IOException e) {
//...
}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.
Real CVEs that MITRE cites as examples of this weakness.
CAPEC attack patterns that exploit this weakness.
Common questions about CWE-311.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-311 CVE affects your products, with AI-written analysis and remediation steps.