Use of Web Browser Cache Containing Sensitive Information

Incomplete Variant
Structure: Simple
Description

This vulnerability occurs when a web application fails to implement secure caching directives, allowing sensitive user data or pages to be stored in the browser's cache where unauthorized parties could retrieve them.

Extended Description

When a web server doesn't send the correct HTTP cache-control headers (like `no-store`, `private`, or appropriate `max-age`), browsers will save copies of pages, form data, or API responses by default. This means sensitive information such as login credentials, personal details, or session tokens could be written to the user's disk, remaining accessible after logout or even to other users on a shared computer. To prevent this, developers must explicitly define a restrictive caching policy for all sensitive content. This involves setting HTTP response headers to instruct the browser not to cache certain pages or to cache them only privately. It's a critical security step that is often overlooked during development but is essential for protecting user privacy and data confidentiality.

Common Consequences 1
Scope: Confidentiality

Impact: Read Application Data

Browsers often store information in a client-side cache, which can leave behind sensitive information for other users to find and exploit, such as passwords or credit card numbers. The locations at most risk include public terminals, such as those in libraries and Internet cafes.

Potential Mitigations 4
Phase: Architecture and Design
Protect information stored in cache.
Phase: Architecture and DesignImplementation
Use a restrictive caching policy for forms and web pages that potentially contain sensitive information.
Phase: Architecture and Design
Do not store unnecessarily sensitive information in the cache.
Phase: Architecture and Design
Consider using encryption in the cache.
Modes of Introduction
Implementation
Taxonomy Mapping
  • OWASP Top Ten 2004
  • OWASP Top Ten 2004