Mixed content blocking in Firefox

Revision Information
  • Revision id: 38835
  • Created:
  • Creator: Hello71
  • Comment: content stolen from MDN - PLEASE DO NOT APPROVE
  • Reviewed: No
  • Ready for localization: No
Revision Source
Revision Content

When a user visits a page served over HTTPS, their connection with the web server is encrypted with SSL and hence safeguarded from sniffers and man-in-the-middle attacks. If the HTTPS page includes HTTP content, this content is not encrypted and hence not safe from sniffers and man-in-the-middle attacks. When a webpage exhibits this behavior, it is called "mixed content". The connection is only partially encrypted, since some of the content is retrieved in cleartext over HTTP and hence accessible to sniffers and can be modified by man-in-the-middle attackers.

What are the risks?

The security community has created two categories for mixed content: Mixed Display Content and Mixed Script Content.

Mixed display content

Mixed Display Content is content served over HTTP that is included in an HTTPS webpage, but that cannot alter other portions of the webpage. For example, an attacker could replace an image served over HTTP with an inappropriate image or message to the user. The attacker could also infer information about the user's activities by watching which images are served to the user; often images are only served on a specific page within a website. If the attacker observes HTTP requests to certain images, he could determine which webpage the user is visiting.

Mixed script content

Mixed Script Content is content that has access to all or parts of the Document Object Model of the HTTPS page. This type of mixed content can alter the behavior of the HTTPS page and potentially steal sensitive data from the user. Hence, in addition to the risks already described for Mixed Display Content above, Mixed Script Content is vulnerable to a few other attack vectors.

In the Mixed Script Content case, a man-in-the-middle attacker can intercept the request for the HTTP content. The attacker can also re-write the response to include malicious JavaScript code. Malicious script can steal the user's credentials, acquire sensitive data about the user, or attempt to install malware on the user's system (by leveraging vulnerable plugins the user has installed, for example).

The risk involved with mixed content does depend on the type of website the user is on visiting and how sensitive the data exposed to that site may be. The webpage may have public data visible to the world or private data visible only when authenticated. If the webpage is public and has no sensitive data about the user, using mixed content still provides the attacker with the opportunity to redirect the user to other HTTP pages and steal HTTP cookies from those sites.