1. Executive Summary & Scope
Cross-Origin Resource Sharing (CORS) policies define how browsers access resources across distinct domain origins. Permissive configurations that dynamically reflect the incoming `Origin` header while setting `Access-Control-Allow-Credentials: true` enable malicious websites to read sensitive authenticated responses.
2. Threat Model & Attack Vectors
A victim visits an attacker-controlled site while logged into the target platform. Malicious JavaScript fetches authenticated user profile and financial data via cross-origin requests, exfiltrating the data to the attacker server.
3. Code Analysis & Remediation Playbook
Vulnerable Implementation Pattern
Hardened Defense-in-Depth Implementation
4. Audit Verification Checklist & Pass Criteria
| Verification Phase | Audit Test Description | Mandatory Passing Criteria |
|---|---|---|
| Null Origin Testing | Send request with header `Origin: null`. | Server must NOT return `Access-Control-Allow-Origin: null` with credentials allowed. |
| Regex Bypass Probing | Send origins with prefixes/suffixes: `webotg.com.attacker.com` or `attackerwebotg.com`. | Origin rejected unless strictly matching whitelisted domain regex anchors. |
| Preflight OPTIONS Verification | Send preflight OPTIONS request containing custom headers. | Preflight response specifies explicit permitted headers and finite max-age cache duration. |
WebOTG Application Security Directorate
WebOTG provides benchmark reference documentation, automated matrix evaluators, and security test harnesses for government digital platforms, WQMS architectures, and STQC compliance frameworks.