csrf bypass using flash file + 307 redirect method at plugins endpoint
The plugins endpoint only checked the Content-Type header for CSRF protection, which could be bypassed using a Flash file and a 307 redirect to send a JSON request. An attacker could create an application on behalf of a logged-in user.
- Disclosed after 42 days
Hi Security team,
i have found that the request sent to https://my.stripo.email/cabinet/stripeapi/v1/plugin/$userid$/plugins don't have any protection against csrf attacks as the server only validates that the content type is application/json and this can be bypassed using the flash file + 307 redirect technique
Steps To Reproduce:
- login to your account at https://my.stripo.email
- visit https://thehackerblog.com/crossdomain/
- use this link as php redirector https://testingsubdomain.000webhostapp.com/stripo.php
- in the request headers : Content-Type: application/json;charset=UTF-8
- the payload
{"email":"[email protected]","name":"csrf poc","webUrl":"csrf poc "}
##Watch the network traffic from the network tab on the Devtools ##and go back to and refresh the site you'll find all the application data have created
all these steps would be integrated together and performed by the attacker's server
i am attaching a poc video declaring the steps
##Supporting Material/References: http://www.geekboy.ninja/blog/exploiting-json-cross-site-request-forgery-csrf-using-flash/ http://resources.infosecinstitute.com/bypassing-csrf-protections-fun-profit/#gref https://blog.cm2.pw/forging-content-type-header-with-flash/
Impact
attacker can send request to create an application in behalf of user
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
Root cause
Likely the server relied solely on the Content-Type header being application/json to prevent CSRF, without any token or origin check.
Impact
An attacker could create an application on behalf of a logged-in user.
What the attacker needed
Victim is logged in; victim visits attacker's page; Flash enabled in browser
How it was found
- Log in to the target account.
- Visit a crossdomain policy page.
- Use a PHP redirector link.
- Set the Content-Type header to application/json.
- Send the JSON payload.
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.
CSRF is when a malicious site makes your browser send a request to another site where you are logged in, without you knowing. Here, the site tried to block such requests by requiring a special header, but the attacker found a way to fake that header using an old browser plugin called Flash and a redirect trick.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.