Skip to content

Protocol: Cache Control Header

Identifier: header_cache_control

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner

Description

When web content contains sensitive information, it's crucial to tell browsers and other caching mechanisms not to store that data. If a website doesn't set a proper Cache-Control header, browsers might save pages that should stay private, which can leave sensitive data exposed to anyone who gains access to the device. The vulnerability happens when developers overlook or misconfigure the header, causing potentially confidential pages to be cached. The risk is that sensitive info, like personal data or secure transactions, becomes retrievable even after a user has logged out or closed the browser, leading to privacy breaches or unauthorized data access.

References:

Configuration

Example

Example configuration:

---
security_tests:
  header_cache_control:
    assets_allowed:
    - REST
    - GRAPHQL
    - WEBAPP
    skip: false

Reference

assets_allowed

Type : List[AssetType]*

List of assets that this check will cover.

skip

Type : boolean

Skip the test if true.