Skip to content

icon: material/server title: Missing Vary: Origin Header in CORS Response search: exclude: true

Do not modify directly the Markdown file. This file is autogenerated from security-test-page-next.md.jinja


Protocol: Missing Vary: Origin Header in CORS Response

Identifier: cors_vary_header

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner ASM Scanner

Description

When a server dynamically sets Access-Control-Allow-Origin based on the request Origin header but omits Vary: Origin, shared caches and CDNs may store one origin-specific response and serve it to other origins. This can cause cache confusion and, in worst cases, cross-origin data exposure when CORS headers are involved.

How we test: We send cross-origin requests and inspect responses where Access-Control-Allow-Origin reflects the request Origin but Vary does not include Origin.

References:

Configuration

Example

Example configuration:

---
security_tests:
  cors_vary_header:
    skip: false

Reference

skip

Type : boolean

Skip the test if true.