-
-
Notifications
You must be signed in to change notification settings - Fork 788
Description
Requirement Referenced
3.4.2 - Browser Security Mechanism Headers
Description of the Issue
The current text for requirement 3.4.2 mandates validating the Origin header against an allowlist but does not explicitly warn against accepting the null origin.
The null origin is a specific edge case generated by browsers in scenarios such as sandboxed iframes or local file access. If an application's allowlist is not strict enough (or if it reflects the origin blindly), an attacker can use a sandboxed iframe to bypass CORS policies by sending Origin: null.
Proposed Change
I propose updating the requirement text to explicitly mention rejecting null unless it is strictly required by the architecture.
Current Text:
...validated against an allowlist of trusted origins. When 'Access-Control-Allow-Origin: *' needs to be used...
Proposed Text:
...validated against an allowlist of trusted origins (specifically rejecting the
nullorigin unless strictly required). When 'Access-Control-Allow-Origin: *' needs to be used...
Motivation
This clarification ensures that developers and security testers specifically verify that the application does not inadvertently allow the null origin, closing a common bypass vector for CORS protections.