Description
The product 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.
Potential Impact
Confidentiality
Read Application Data
Demonstrative Examples
response.addCookie( new Cookie("userAccountID", acctID) );Detection Methods
- 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 sea
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2002-1800 | Admin password in cleartext in a cookie. |
| CVE-2001-1537 | Default configuration has cleartext usernames/passwords in cookie. |
| CVE-2001-1536 | Usernames/passwords in cleartext in cookies. |
| CVE-2005-2160 | Authentication information stored in cleartext in a cookie. |
Related Weaknesses
Taxonomy Mappings
- PLOVER: — Plaintext Storage in Cookie
- Software Fault Patterns: SFP23 — Exposed Data
Frequently Asked Questions
What is CWE-315?
CWE-315 (Cleartext Storage of Sensitive Information in a Cookie) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product stores sensitive information in cleartext in a cookie.
How can CWE-315 be exploited?
Attackers can exploit CWE-315 (Cleartext Storage of Sensitive Information in a Cookie) to read application data. This weakness is typically introduced during the Architecture and Design phase of software development.
How do I prevent CWE-315?
Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.
What is the severity of CWE-315?
CWE-315 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 4 real-world CVEs.