Skip to content

Clarify CORS validation in 3.4.2 to explicitly reject 'null' origin #3322

@Galaxy-sc

Description

@Galaxy-sc

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 null origin 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.

Metadata

Metadata

Assignees

Labels

1) Discussion ongoingIssue is opened and assigned but no clear proposal yetV3 (prev V50)Group issues related to Web Frontend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions