Resend a GraphQL mutation as a form-encoded POST to test for CSRF on cookie-authenticated endpoints
POST /graphql Content-Type: application/x-www-form-urlencodedquery=mutation{updateEmail(email:"a@example.com"){id}} Tag
Published tips with this tag, newest first. Payloads and commands are shown as plain text.
Cross-site request forgery (CSRF) tips, and how to hunt it
Tag #csrfRemove tag filter
POST /graphql Content-Type: application/x-www-form-urlencodedquery=mutation{updateEmail(email:"a@example.com"){id}} <a href="https://target.com/transfer?to=attacker&amount=100">view the invoice</a>To test for Cross-Site Request Forgery (CSRF) vulnerabilities, identify sensitive state-changing functionality on the target application, such as changing an email address or updating account information. Capture the HTTP request for the functionality using a tool like Burp Suit…
When testing OAuth authorization flows on target.com, try sending a HEAD request to the authorization URL instead of GET or POST. This can help reveal if the server is vulnerable to method confusion, where the HEAD request is treated as a POST and grants access without user cons…
POST /account/email HTTP/1.1Cookie: session=<sessionB>Content-Type: application/x-www-form-urlencodedTry to create a cron job as a low-privileged user that executes a command as a more privileged user, such as sudo /usr/local/hestia/bin/v-change-user-password admin toor. If the cron job is created successfully, it may be possible to exploit a broken authorization check, such as…