Missing X-Content-Type-Options

Disclosed: 2020-03-01 13:59:09 By pal434 To nextcloud
Unknown
Vulnerability Details
Nextcloud doesn't have a header settings for X-Content-Type Options which means it is vulnerable to MIME sniffing. The only defined value, "nosniff", prevents Internet Explorer and Google Chrome from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome when downloading extensions. This reduces exposure to drive-by download attacks and sites serving user uploaded content that by clever naming could be treated by MSIE as executable or dynamic HTML files. Please have a look at below links https://hackerone.com/reports/6935 https://hackerone.com/reports/77081 https://hackerone.com/reports/9479/ Implement Add the X-Content-Type-Options header with a value of "nosniff" to inform the browser to trust what the site has sent is the appropriate content-type, and to not attempt "sniffing" the real content-type. X-Content-Type-Options: nosniff ## Impact MIME type sniffing is a standard functionality in browsers to find an appropriate way to render data where the HTTP headers sent by the server are either inconclusive or missing. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the intended content type. The problem arises once a website allows users to upload content which is then published on the web server. If an attacker can carry out XSS (Cross-site Scripting) attack by manipulating the content in a way to be accepted by the web application and rendered as HTML by the browser, it is possible to inject code in e.g. an image file and make the victim execute it by viewing the image.
Actions
View on HackerOne
Report Stats
  • Report ID: 369979
  • State: Closed
  • Substate: resolved
  • Upvotes: 3
Share this report