Skip to content
Access control Write-up Intermediate

Execution After Redirection (EAR): The Silent High-Impact Bug That Lets You Bypass Logins Like…

The article describes an Execution After Redirection (EAR) flaw where a server sends a 302 redirect for unauthenticated users but continues executing the protected admin logic and writes the admin dashboard into the response body. An attacker who intercepts the response can change the status to 200 OK and remove the Location header to view the admin content without authentication.

_crac Follow

Published on medium.com

If you’ve been doing bug hunting or web security for even a few months, you’ve definitely encountered 302 redirects during authentication flows. They look boring, harmless, predictable.

CRAC Learning, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The server issues a redirect for unauthenticated users but does not stop execution, so the protected page is still generated and included in the response body.

Impact

If the server has weak access control and does not stop execution after the redirect, an attacker could gain unauthenticated access to the admin dashboard and sensitive backend functionality.

What the attacker needed

Target uses redirect for access control; attacker can intercept HTTP responses; admin endpoint URL is predictable

The fix

Redirect responses should be sent with an empty body and execution should stop immediately after the redirect, using 401 or 403 for unauthorised access instead of relying on a 302.

How it was found

  1. Visit the admin login page to learn the folder name, file naming style, and technology stack.
  2. Guess a likely authenticated admin endpoint such as the admin index page.
  3. Request that endpoint without authentication and observe the 302 redirect back to the login page.
  4. Intercept the response and change the status code from 302 Found to 200 OK.
  5. Remove the Location header from the response.
  6. Forward the modified response and check whether the admin dashboard content is returned.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you visit a protected page without logging in, the server often sends a redirect that tells your browser to go to the login page. The mistake here is that the server keeps building the protected page even after sending that redirect, so the secret content is still inside the response. A browser hides it by following the redirect, but an attacker using a proxy tool can stop the redirect and read the hidden content.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.