DEV Community

Discussion on: Xss JaVaSCRipt PoLYglOTs

Collapse
 
likebrain profile image
Ricardo Rivera • Edited

Hey, that's a very interesting topic! Thanks for this great article.

I think an additional away to close this XSS gap is to use more strict http headers.
For example you can use "X-Content-Type-Options" to avoid a "Mime-Type Transform" and make it more strict.

developer.mozilla.org/en/docs/Web/...

//Edit
The combination with serviceworker could also be interesting. The Cache API could enable potential MimeType sniffing / ploygot here.

Collapse
 
caffiendkitten profile image
DaNeil C

Thanks for the input Ricardo! Using more strict http headers is something that I am actually looking into later one. I've heard about some issues with URL parsing that sounds interesting too. I feel like I keep hearing about serviceworkers lately too and want to look into them more also.