How to fix: Mixed-Protocol Content (HTTPS Page Loading HTTP Resources)
Pages served over HTTPS include subresources (scripts, images, iframes, XHR) loaded over plain HTTP. Browsers block or warn on mixed content, and the HTTP subresources are vulnerable to MITM modification.
Why it matters
An attacker on the network can modify HTTP subresources in transit. A malicious script injected into an HTTP JS resource runs in the HTTPS page's origin, giving full access to session cookies and the DOM.
Mixed content occurs when an HTTPS page loads resources over HTTP. Modern browsers block active mixed content (scripts, iframes) and warn on passive mixed content (images). The HTTP resources are still vulnerable to MITM tampering regardless of the HTTPS page.
How to fix it
- 1Replace all http:// URLs in templates with https:// or protocol-relative //.
- 2Add a Content-Security-Policy header with upgrade-insecure-requests.
- 3Audit third-party widgets and ad tags for HTTP-only assets.
Code examples
CSP upgrade-insecure-requests
Content-Security-Policy: upgrade-insecure-requestsNext.js (next.config.mjs)
const nextConfig = {
async headers() {
return [{
source: '/(.*)',
headers: [{ key: 'Content-Security-Policy', value: 'upgrade-insecure-requests' }],
}];
},
};
export default nextConfig;References
Detected automatically by VulnRadar. The check id is mixed-protocol-content, stable across every scan so you can filter or diff on it.
More ssl checks
- HighSecure Cookie Set on HTTP Endpoint
- CriticalSite Served Over Unencrypted HTTP
- InfoExpect-CT Header Not Present
- LowHTTPS Served on Non-Standard Port
- InfoX-HTTP-Method-Override / X-Forwarded-Method Header in Response
- InfoHSTS Present on HTTP Response (SSL-Strip Indicator)
- LowHSTS declared in a meta tag, where browsers ignore it
- MediumAlt-Svc advertises cleartext HTTP/2 (h2c)
Questions
- How severe is Mixed-Protocol Content (HTTPS Page Loading HTTP Resources)?
- VulnRadar rates this medium severity in the ssl category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id mixed-protocol-content, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Mixed-Protocol Content (HTTPS Page Loading HTTP Resources) map to?
- It maps to CWE-319. In the OWASP Top 10 it falls under A02:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.