Content Type Tampering
Last updated
Was this helpful?
Last updated
Was this helpful?
This can lead to unauthorized actions, such as bypassing file type validation, injecting malicious content, or compromising data integrity.
Validate and sanitize the Content-Type
header on the server side, implement proper file type validation, and enforce security policies that restrict content types to expected and safe values.
We can check the behaviour on different Content-Type
formats. This could result in:
Triggering verbose erros.
Bypass flawed defences.
Leverage differences in processing logic (e.g. secure with JSON but flawed with XML).
We can easily do that using Burp's extension (Figure 1).
The below example is based on the application.
Try adding Content-Type: application/json
in the request and send a blank body. This might return a stack trace!