CWE-315: Cleartext Storage of Sensitive Information in a Cookie
Weakness ID: 315
The application stores sensitive information in cleartext in a cookie.
Attackers can use widely-available tools to view the cookie and read the sensitive information. 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.
Different people use "cleartext" and "plaintext" to mean the same thing:
the lack of encryption. However, within cryptography, these have more
precise meanings. Plaintext is the information just before it is fed into a
cryptographic algorithm, including already-encrypted text. Cleartext is any
information that is unencrypted, although it might be in an encoded form
that is not easily human-readable (such as base64 encoding).
Time of Introduction
Architecture and Design
Technical Impact: Read application
The following code excerpt stores a plaintext user account ID in a
response.addCookie( new Cookie("userAccountID", acctID);
Because the account ID is in plaintext, the user's account information
is exposed if their computer is compromised by an attacker.