CSRF via Content-Type

Current Session

Your current name: BraveWolf

Session ID: 2214cf9c8b975978a3fa4809eb90e1d8

How to Test

You can update your name by sending a POST request to this endpoint with either:

Example request:

POST /csrfContentType.php
Content-Type: text/plain

{"name": "NewName"}

Vulnerability

This endpoint accepts both application/json and text/plain content types. The text/plain content type can be sent via a top-level navigation, making it vulnerable to CSRF attacks even with SameSite cookies.