Plaintext Storage in a Cookie |
Weakness ID: 315 (Weakness Variant) | Status: Draft |
Description Summary
Storing sensitive data in plaintext in a cookie makes the data more easily accessible than if encrypted. This significantly lowers the difficulty of exploitation by attackers.
Example 1
The following code excerpt stores a plaintext user account ID in a browser cookie.
(Bad Code)
Example Language: Java
response.addCookie( new Cookie("userAccountID", acctID);
Reference | Description |
---|---|
CVE-2002-1800 | SecurityDatabase\User\Admin password in plaintext 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. |
Sensitive information should not be stored in plaintext in a cookie. Even if heavy fortifications are in place, sensitive data should be encrypted to prevent the risk of losing confidentiality. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 312 | Cleartext Storage of Sensitive Information | Development Concepts (primary)699 Research Concepts (primary)1000 |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
PLOVER | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Taxonomy Mappings | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | Plaintext Storage in Cookie | |||