Vendor Audit

Browser security headers

X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy harden the browser against common attack patterns. Each closes a specific class of vulnerability: clickjacking, MIME sniffing, referrer leakage, and unauthorised feature access.

How Security headers works

X-Frame-Options: DENY (or SAMEORIGIN) prevents your pages from being embedded in <frame>, <iframe>, <object>, or <embed> on other sites. This blocks clickjacking, where an attacker frames your login page transparently over their own UI and tricks the user into clicking on your form. CSP's frame-ancestors directive supersedes X-Frame-Options for modern browsers, but X-Frame-Options is still a defence for users on older browsers.

X-Content-Type-Options: nosniff disables MIME-type sniffing. Browsers historically tried to guess the content type of a response when the Content-Type header was missing or generic — useful for legacy sites, but exploitable when an attacker can upload a file that gets served with a permissive content type. nosniff turns the guessing off; the browser uses the declared Content-Type or refuses to interpret the file.

Referrer-Policy controls what's sent in the Referer header when a user clicks a link from your site. The default browser behaviour (strict-origin-when-cross-origin) sends only the origin to cross-origin destinations and the full URL to same-origin destinations. Stricter values like no-referrer or same-origin reduce information leakage further; weaker values like unsafe-url leak full URLs over HTTP and should never be used.

Permissions-Policy (formerly Feature-Policy) controls which browser APIs your site can use — camera, microphone, geolocation, payment, USB, etc. An empty allowlist for sensitive features (geolocation=(), camera=()) means even an XSS injection can't trigger a permission prompt. This is mostly useful as a defence in depth: most sites don't need most APIs, and turning them off costs nothing.

Two more headers worth setting: Cross-Origin-Opener-Policy: same-origin isolates your tab's browsing context from cross-origin pages, defending against tab-nabbing and Spectre-class attacks. Cross-Origin-Resource-Policy: same-origin (or same-site) prevents your resources from being loaded by cross-origin pages, blocking some categories of resource-timing side channels.

Three headers are obsolete and should be removed. X-XSS-Protection switched on a filter that browsers have since removed, and its filtering mode could itself introduce flaws, so send none (or 0). Public-Key-Pins (HPKP) pinned certificate keys and could lock visitors out when keys changed; browsers dropped it. Expect-CT asked for Certificate Transparency, which browsers now require anyway.

How to fix it

Add all four headers in your web server config; sensible defaults are DENY, nosniff, strict-origin-when-cross-origin, and a Permissions-Policy that turns off features you don't use (camera=(), microphone=(), geolocation=()).

The 9 Security headers checks Vendor Audit runs

Each check has a fixed set of results, and each result has one rating. These are the exact words the report uses.

Clickjacking protection

Standard: CSP Level 3

What it checks. X-Frame-Options, or the frame-ancestors directive of a Content-Security-Policy, tells browsers which sites may show this one inside a frame.

Why it matters. Without it another site can load this one invisibly and trick a visitor into clicking on it.

How to fix it. Send Content-Security-Policy: frame-ancestors 'none' (or 'self'), and X-Frame-Options: DENY for older browsers.

X-Content-Type-Options

Standard: WHATWG Fetch

What it checks. X-Content-Type-Options: nosniff tells browsers to trust the declared content type of a response.

Why it matters. Without it a browser may guess the type, and treat an uploaded file as a script.

How to fix it. Send X-Content-Type-Options: nosniff on every response.

Referrer-Policy

Standard: W3C Referrer Policy

What it checks. Referrer-Policy controls how much of the current address is sent along when a visitor follows a link to another site.

Why it matters. Full addresses can carry session tokens, password-reset links or search terms; without a policy they can leak to every site the page links to or loads from.

How to fix it. Send Referrer-Policy: strict-origin-when-cross-origin, or no-referrer.

Permissions-Policy

Standard: W3C Permissions Policy

What it checks. Permissions-Policy states which browser features, such as camera, microphone and location, the page and its frames may use.

Why it matters. A feature left open can be requested by any script or embedded frame on the page.

How to fix it. Send a Permissions-Policy that turns off what the site does not use, for example geolocation=(), camera=(), microphone=().

Cross-Origin-Opener-Policy

Standard: WHATWG HTML

What it checks. Cross-Origin-Opener-Policy separates this page from windows that other sites open or that open it.

Why it matters. Without it a site that opens this one keeps a handle to the window, which cross-site leak attacks rely on.

How to fix it. Send Cross-Origin-Opener-Policy: same-origin.

Cross-Origin-Resource-Policy

Standard: WHATWG Fetch

What it checks. Cross-Origin-Resource-Policy states which sites may load this site's resources.

Why it matters. Without it any site can embed these resources, which side-channel attacks such as Spectre rely on.

How to fix it. Send Cross-Origin-Resource-Policy: same-origin, or same-site when subdomains share resources.

X-XSS-Protection deprecated

Standard: OWASP Secure Headers

What it checks. X-XSS-Protection switched on an old browser filter for cross-site scripting. Browsers have since removed that filter.

Why it matters. Where the header is still honoured, its filtering mode has itself been used to attack pages.

How to fix it. Remove the header or send X-XSS-Protection: 0, and rely on a Content-Security-Policy instead.

HPKP absent

Standard: RFC 7469 (obsolete)

What it checks. Public-Key-Pins (HPKP) told browsers to accept only certificates with the listed keys. Browsers dropped it.

Why it matters. In the browsers that still honour a cached pin, losing or rotating the pinned keys locks visitors out for the pin's lifetime.

How to fix it. Remove the Public-Key-Pins header.

Expect-CT absent

Standard: RFC 9163

What it checks. Expect-CT asked browsers to require Certificate Transparency. Browsers now require it anyway and ignore the header.

Why it matters. It is harmless, but does nothing.

How to fix it. Remove the Expect-CT header.

Related

Content Security Policy · Cookies · HSTS