Logout page does not prevent CSRF
The logout endpoint accepts cross-site requests without CSRF protection, so an attacker can force a logged-in user to log out. The report claims this could also log the victim into the attacker's account, but the provided proof only shows a logout request.
Originally disclosed on HackerOne
- Disclosed after 13 days
Summary:
Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated. ... If the victim is an administrative account, CSRF can compromise the entire web application.
Steps To Reproduce:
1.Create a CSRF logout POC using the following code. Code That i use:--
<html> <!-- CSRF PoC - generated by Burp Suite Professional --> <body> <script>history.pushState('', '', '/')</script> <form action="https://www.trycourier.app/logout"> <input type="submit" value="Submit request" /> </form> </body> </html>Supporting Material/References:
I have provided a attack senirio for it please check it
Impact
Logout any victim into the attacker account, send the HTML made by attacker and then logout him from the Session.
The hacker selected the Cross-Site Request Forgery (CSRF) weakness. This vulnerability type requires contextual information from the hacker.
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could log a victim out of their session, and the report claims it could also log the victim into the attacker's account, though that is not shown.
What the attacker needed
Victim is logged in; victim visits attacker's page
How it was found
- Create an HTML page with a form that submits to the logout endpoint.
- Send the HTML page to a victim.
- When the victim submits the form, they are logged out.
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 report has not been written yet. The Original tab links to the source.
When you are logged into a website, your browser sends a session cookie with every request to that site. If the site does not check that a request was intentionally made by the user, another website can make your browser send a request without your knowledge. Here, that request logs you out, which is annoying but not dangerous; the report also suggests it could log you into the attacker's account, but that is not demonstrated.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.