Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BlackFan/content-type-research

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

22 Commits

Repository files navigation

Content-Type Research

XSS

Content-Type that can be used for XSS and some related tricks

CSRF

All frameworks were analyzed with disabled default token-based CSRF protection

Examples of incorrect Content-Type parsing that can be used for CSRF.
For example, the ability to send an HTTP request that will be interpreted as JSON without a CORS preflight request.
Can be used in combination with attacks requiring boolean or array in HTTP request (PHP Type Juggling, NoSQL Injection, Prototype Pollution, ...)

Interesting results

WAF Bypass

Basic Idea

HTTP Request Application WAF Result
Content-Type: application/x-www-form-urlencoded

q=' union select '1
' union select 1' ' union select 1' ➖ Blocked
Content-Type: application/json

{"q":"' \u0075nion \u0073elect '1"}
' union select 1' ' union select 1' ➖ Blocked
Content-Type: application/x-www-form-urlencoded;/json

{"q":"' \u0075nion \u0073elect '1"}
' union select 1' {"q":"' \u0075nion \u0073elect '1"} ✔️ Bypass

Interesting results

Programming languages / Frameworks

Name CSRF friendly WAF Bypass friendly
PHP ✔️
Laravel ✔️ ✔️
Symfony ✔️
Laminas, Mezzio, Zend ✔️ ✔️
Yii
Wordpress
CakePHP
CodeIgniter
Django ✔️
Flask ✔️
CherryPy ✔️
Express body-parser
Express multer ✔️
Rails ✔️

About

Content-Type Research

Resources

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /