Mixed Content
Pages served over HTTPS load some resources over plain HTTP, which an attacker on the network path can observe or replace, depending on the browser.
| Severity | Low |
| CVSS 3.1 | 3.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N Open in the calculator |
| CVSS 4.0 | 2.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-319: Cleartext Transmission of Sensitive Information |
| OWASP Top 10 | A04:2025 Cryptographic Failures |
| MITRE ATT&CK | T1557 Adversary-in-the-Middle |
| Category | Cryptographic Failures |
Description
Pages delivered over HTTPS load some of their resources, such as images, scripts, stylesheets, fonts, frames or data fetched by script, from http:// addresses. Those requests travel without encryption, so the protection the page appears to have does not extend to everything it loads.
Browsers handle mixed content according to its type. Current browsers block scripts, stylesheets, frames, fonts and requests made from script, and most now upgrade images, audio and video to HTTPS automatically, dropping them if the upgrade fails. Older browsers may still load images and media over HTTP, sometimes with only a warning, and there an attacker on the network path, such as on a shared wireless network, can replace images or media with content of their choosing, for example to mislead users or deface the page, and can see which of those resources a user requests. On current browsers the visible effect is therefore often broken functionality rather than exposure, but the protection users receive depends on the browser they use.
The impact rises in three cases: where a browser loads an active resource such as a script over HTTP, which current browsers refuse to do, the attacker could run code in the page and take over the user's session; where a session cookie lacks the Secure attribute, it is sent in cleartext with any HTTP request to the same host; and where a form on an HTTPS page submits to an http:// address, which browsers generally warn about before sending, whatever the user enters is exposed.
The issue is identified by reviewing page source and the browser's developer console, which reports blocked and upgraded requests, or by scanners that list the http:// resources referenced from HTTPS pages. Related variants are forms that submit to http:// addresses and download links that use HTTP.
Remediation
Load every resource over HTTPS:
- Change each
http://reference in pages, templates, stylesheets, scripts and stored content tohttps://, or to a relative path for resources on the same site. Content management systems often keep absolutehttp://addresses in content held in the database, so search there as well as in the code. - Where a third-party resource is not available over HTTPS, host a copy on the site or replace it.
- Make every form's
actionan HTTPS address, and serve downloads over HTTPS. - As a safety net, send the Content Security Policy directive
upgrade-insecure-requests, which tells browsers to request the page's HTTP resources over HTTPS instead. It relies on each resource being available over HTTPS and does not change links that lead to other sites.
Confirm the fix by loading each affected page with the browser's developer console open and checking that no mixed content warnings or blocked requests are reported.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.