Skip to content

Empty Origin header bypasses CORS checks #39108

Description

@AAliKKhan

In cors.ts, isAllowedCorsOrigin and isAllowedRequestOrigin use if (!input) return true. This treats an empty string (from an empty Origin header) the same as undefined (no Origin header), allowing clients that send Origin: with empty value to bypass all CORS validation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions