Skip to content

Limit the length of the Referer header #903

@annevk

Description

@annevk

As it's attacker-controlled it can be used for cache-eviction or determining cookie size.

To quote @mikewest in https://bugs.chromium.org/p/chromium/issues/detail?id=959757 (it's worth reading this for some more relevant discussion):

As noted in https://github.com/xsleaks/xsleaks/wiki/Browser-Side-Channels#cache-and-error-events, servers will often behave in unexpected ways when presented with an overly-long Referer header. This is unfortunate, as Referer is one header whose length attackers generally retain control over when generating no-cors requests.

Perhaps we can cap it to something reasonable? This would be conceptually similar to the cap in https://fetch.spec.whatwg.org/#cors-safelisted-request-header for CORS requests...

cc @whatwg/security

Metadata

Metadata

Assignees

No one assigned

    Labels

    impacts documentationUsed by documentation communities, such as MDN, to track changes that impact documentationsecurity/privacyThere are security or privacy implicationstopic: http

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions