Skip to content

Test your website now

Free, no card. We read only public pages.

Run free audit →

Security · Low severity

Cross-Origin-Opener-Policy Header Missing: Choose COOP

Fix a missing Cross-Origin-Opener-Policy header. Choose COOP for your window relationships, test OAuth and payment popups, and verify actual browser behaviour.

Published · Updated

What the check tests

Check
sec.headers.coop - Cross-Origin-Opener-Policy header
Passes when
Serve Cross-Origin-Opener-Policy: same-origin on HTML responses.
Scope
graded on every page crawled
Severity
Low
Fix effort
small - under an hour
Impact when fixed
low

In one paragraph

A missing Cross-Origin-Opener-Policy header leaves the document without an explicit COOP policy for separating browsing context groups. COOP can reduce cross-window attack surfaces, but restrictive values may disrupt popup communication. Choose the policy from your actual opening and messaging flows, then test both sides of those flows. Header presence alone does not establish effective isolation or safe integrations.

Why it matters

An opener and an opened window can retain references to one another. Across origins those references are restricted, but they still expose some capabilities and observable behaviour. COOP controls when documents share a browsing context group and when those window references are severed, reducing certain XS-Leaks and unwanted relationships.

The outcome depends on both documents' policies, their origins, and how the new document opens. It is not a blanket rule that one value preserves every popup or isolates every possible interaction. Same-origin pages can also end up separated when their COOP policies do not match.

COOP is not CSP frame-ancestors, CORS, or a complete authentication boundary. It also does not independently enable every feature requiring cross-origin isolation: appropriate COEP and other conditions matter too.

How WebAuditOS evaluates this finding

The supplied check tests HTML responses for the header's presence. Any value passes; no header fails at low severity. Non-HTML and unavailable responses are not graded. unsafe-none can therefore pass while retaining the default permissive COOP behaviour.

A passing label does not validate the chosen value or execute an OAuth flow. It says nothing by itself about whether the document is crossOriginIsolated. Review the effective header and test the integration's actual windows and messages.

How to fix it

  1. Inventory pages that open windows or are opened by another service. Include social sign-in, popup payment, support consoles, and internal tools. Document whether completion uses postMessage, window.opener, or an opener-held window handle.
  2. Consider same-origin for pages that do not require cross-origin opener communication:
Cross-Origin-Opener-Policy: same-origin

This is a restrictive starting point to test, not a universal drop-in setting. The resulting relationship depends on both pages' policies.

  1. Where your application must retain references to popups it opens, evaluate:
Cross-Origin-Opener-Policy: same-origin-allow-popups

It can preserve a shared group for popups opened with unsafe-none, subject to the opening rules. It does not guarantee compatibility if the provider uses another restrictive policy. Follow the provider's current integration guidance.

  1. Use route-specific exceptions only where required. unsafe-none is a deliberate opt-out rather than equivalent hardening. Other COOP values exist for different isolation needs; do not choose one merely because its name sounds like it preserves every integration.
  2. Configure the response header in the application or delivery layer and verify it on final top-level documents, including redirected callback destinations. If framework security middleware supplies defaults, inspect what it actually emits rather than assuming a missing custom setting means no policy.
  3. Test the complete flow in supported browsers. Open the popup, complete success and cancellation, return to the application, and confirm that it recognises completion. Check Console messages and whether expected references survive. Test third-party policy changes and error paths where practical.
  4. Keep message handling secure even when references are preserved. Validate the expected message origin and data; COOP compatibility does not make arbitrary messages trustworthy.
  5. Rescan relevant HTML responses. If cross-origin isolation is a feature requirement, inspect crossOriginIsolated separately and verify the full COOP/COEP design, not just this finding.

What the fix can break

A separated browsing context can break completion signals while the provider's popup looks successful. Application monitoring may see no failed HTTP request, so user-journey tests matter.

Changing a site-wide header can affect pages that another party opens, not only your own outgoing links. Compare login, callback, and account routes rather than testing one page in isolation.

Avoid promising that same-origin-allow-popups fixes every social login. Its compatibility is conditional on the other document and opening method. A targeted exception can be better than weakening all pages, but should have an owner and a clear reason.

Questions

Does COOP control whether another site can iframe us?

No. Use CSP frame-ancestors or appropriate X-Frame-Options for framing restrictions. COOP concerns top-level window relationships.

Will same-origin-allow-popups always preserve OAuth?

No. It supports particular relationships, including opened documents using unsafe-none. Test the actual provider and both documents' policies.

Does unsafe-none satisfy the scanner?

The supplied rule passes any present value. That does not mean unsafe-none supplies restrictive isolation.

Review Cross-Origin-Resource-Policy and the security headers guide, keeping their distinct purposes separate.

Standards and sources

  • OWASP Secure Headers

In the report

Test this on your own site

Every scan runs sec.headers.coop on every page it crawls, on every plan. The finding carries this id, so a line in a report can be matched to the explanation above - and the free scan needs no account.