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

Aperta
#3,322 12 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@elarlang ci sta già lavorando.

Dal 7/1/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

1) Discussion ongoing V3 (prev V50)
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.

Lingua principale
HTML
Stelle
3.9k
Fork
865
Merge medio
3g 4h
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OWASP/ASVS

Tutte le issue di OWASP/ASVS

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.