Everyone Tested the Login Page — I Tested the Logout Button Instead
The logout endpoint failed to invalidate the session cookie, and a cacheable internal session status endpoint trusted the X-Forwarded-Host header, allowing cache poisoning. An attacker could chain these flaws to leak admin session data and access admin APIs.
infosecwriteups.com
Published on infosecwriteups.com
Free link🎈
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
Likely the logout endpoint did not invalidate the session, and a cacheable internal endpoint trusted the X-Forwarded-Host header, enabling cache poisoning.
Impact
An attacker could obtain admin session data and access admin APIs, but the text does not confirm this was tested against a real target.
What the attacker needed
Victim clicks logout; attacker can send crafted requests; cacheable internal endpoint
How it was found
- Send a logout request with a valid session cookie and observe that the session remains valid.
- Reuse the same cookie to access a privileged endpoint and confirm the user is still logged in.
- Discover an unauthenticated, cacheable internal session status endpoint.
- Send a logout request with a malicious X-Forwarded-Host header to poison the cache.
- Have a victim trigger logout so the poisoned cache serves a response containing admin session data.
- Use the leaked bearer token to access admin endpoints.
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 log out of a website, the site should destroy your session so your account cannot be accessed again without logging in. Here, logging out left the session cookie working, and a poorly configured cache could be tricked into storing a redirect that exposed sensitive session information to other users.
What is Cache bugs?
A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.