Cyber Risks · PortSwigger Research

Content type incorrectly stated

Summary: PortSwigger Research describes how a response with an incorrect Content-type header can cause browsers to process it in unexpected ways, and if the stated type is a renderable text-based format, the browser will usually interpret the response as that format regardless of its actual contents. Some other specified content types may also be interpreted as HTML due to browser quirks, which can cause otherwise safe content such as images to render as HTML and enable cross-site scripting in certain conditions.

Bottom line: The flaw typically only becomes a security issue when the affected resource is dynamically generated, uploaded by a user, or otherwise contains user input, so the exposure depends on which of your responses carry user-supplied content under a misstated type.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related