When Trusted Subdomains Become Dangerous: Chaining Low-Severity V
A trusted subdomain had login CSRF and an open redirect, while the main dashboard skipped CSRF checks when the Referer came from that subdomain. An attacker could chain these to make a victim's browser send a state-changing GET request that deleted the victim's account.
During a recent security assessment, I discovered a vulnerability chain involving a trusted subdomain and the main dashboard application. Individually, each issue appeared low severity.
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 main dashboard relied on the Referer header to decide whether to enforce CSRF protection, trusting any request that appeared to come from a sibling subdomain.
Impact
An attacker could delete a logged-in victim's account through a single malicious link, without any further interaction.
What the attacker needed
Victim logged into main dashboard; victim clicks a link; attacker has an account on subdomain
The fix
The issues were fixed; the report does not detail the exact changes, but the fix should remove Referer-based CSRF exemptions, add CSRF tokens to the subdomain's login flow, avoid state-changing GET requests, and validate redirect targets.
How it was found
- The victim, already logged into the main dashboard, opens a malicious link.
- The link targets the trusted subdomain, where login CSRF logs the browser into the attacker's account on that subdomain.
- The subdomain's open redirect forwards the victim's browser to the account deletion endpoint on the main dashboard.
- The browser sends the victim's existing main dashboard session cookies with the request.
- The dashboard sees a Referer from the trusted subdomain and skips CSRF token validation.
- The state-changing GET request runs with the victim's cookies and deletes the victim's account.
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.
A website often trusts another site it owns, so it may not check for a secret token when a request comes from there. Here, an attacker could use that trust to trick a logged-in victim's browser into visiting a link that deletes their account. The deletion happened because the request was a simple GET and the site only looked at where the request seemed to come from.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.