Skip to content

Conversation

Pedro-Bernardo
Copy link

It is possible to detect redirections using fetch with the same technique as presented in "client-side inflation errors."

Example:
await fetch("https://target.com/redir#<BIG-fragment>", {method: 'GET', mode :'no-cors', credentials: 'include'});

If the server redirects to an endpoint bigger than /redir when there is a cookie attached to the request, the first request succeeds, but the second request (redirection) will raise an exception which can be observed. Provided that length(URL + #<BIG-fragment>) = (URL size limit - 1)

Works on Chrome (2MB URL size limit) and Firefox (1MB URL size limit).

These requests are rejected by the RIP.

It is possible to detect redirections using fetch using the same technique of client-side inflation errors.

For example, on Chrome:
`await fetch(`https://bank.com/redir#<BIG-fragment>`, {method: 'GET', mode :'no-cors', credentials: 'include'});`

The server redirects to `/bigger` based on a cookie which is included in the fetch request. The first request succeeds, but the second request (redirection) will raise an exception which an attacker can observe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant