Exploit to detect which Social Networks you are logged into
The login redirect mechanisms of Twitter and Google could be abused to detect whether a visitor is logged in to those services. An attacker could use this to track which social networks a user is logged into.
tomanthony.co.uk
Published on tomanthony.co.uk
{{media:0}} Example output - try it here.
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 login redirect parameter allowed redirecting to any same-domain resource, including images, and the presence of the image could be detected via onload/onerror events.
Impact
An attacker could detect whether a visitor is logged in to Twitter or Google, which could be used to track users or tailor content, though the method may be fixed and some browsers or extensions could block it.
What the attacker needed
Victim visits attacker's website; victim is logged in to target service
The fix
The login redirect should only allow redirects to safe pages, not to arbitrary resources like images, or should require additional validation.
How it was found
- Create a hidden image tag pointing to the login URL with a redirect parameter set to an image on the same domain.
- Use JavaScript onload and onerror handlers to detect whether the image loaded.
- If the image loads, the user is logged in; if it errors, the user is not logged in.
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 in to a website, it often remembers you and redirects you to a page you wanted. The researcher found that some sites would redirect to any page on their domain, even an image, if you were already logged in. By loading that image in a hidden tag, a website could tell if you were logged in because the image would load only if you were.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.