Cyber Risks · PortSwigger Research

Multiple content types specified

Summary: PortSwigger Research describes the case where an HTTP response specifies multiple incompatible content types, prompting the browser to analyze the response and determine the actual MIME type itself. That behavior can produce unexpected results and, when the content includes user-controllable data, may lead to cross-site scripting or other client-side vulnerabilities.

What's compelling: The source notes that multiple incompatible content type statements usually are not a security flaw, particularly with static content, so the exposure depends on whether affected responses carry user-controllable data. The recommended fix is a single Content-type header that correctly and unambiguously states the MIME type for every response with a message body.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related