Content-Security Policy bypass with File Uploads

Post Reply
Shane1145
Posts: 1836
Joined: Wed Sep 25, 2024 2:31 pm

Content-Security Policy bypass with File Uploads

Post by Shane1145 »

The default CSP header blocks execution of inline-scripts. When a HTML injection vulnerability occurs though, that restriction can be bypassed by uploading a JavaScript file via the file-upload feature (with application/javascript or text/javascript content-type) to include it in a `<script src="<UPLOAD_URL></script>" tag.


https://hackerone.com/reports/1380157
Post Reply