A Cross-Origin-Opener-Policy Header Missing finding means the tested document does not declare a valid Cross-Origin-Opener-Policy response header. COOP controls whether top-level documents share a browsing context group with pages opened through navigation or Window.open(). Separating those groups can cut references such as window.opener and reduce cross-origin leak techniques.
COOP controls relationships between top-level documents and the browsing context groups they share. That makes it different from CORS, CORP, or ordinary API access control. A strict policy can improve isolation and reduce classes of cross-origin leaks, but it can also disrupt popup-based SSO, payment, support, and federated-login flows that rely on window.opener or related window state.
What Does “Cross-Origin-Opener-Policy Header Missing” Mean?
Scanner meaning
OWASP ZAP alert 90004-3 is a passive, beta, low-risk site-isolation finding. It reports that Cross-Origin-Opener-Policy is missing or invalid.
Security meaning
COOP can separate documents into different browsing context groups, severing opener relationships across origins and helping mitigate classes of XS-Leaks. It is also one half of the common cross-origin-isolation setup used with COEP.
same-origin. Authentication providers, payment windows, file pickers, and support tools may depend on opener/closed-state behavior that a stricter COOP policy intentionally changes.How Scanners Detect This Finding
ZAP’s site-isolation rule checks COOP together with COEP and CORP, but each alert represents a different control. A COOP finding should be evaluated on top-level documents because the header governs browsing context groups and opener relationships rather than ordinary API response sharing.
The scanner can identify a missing or invalid value, but it cannot know whether your product intentionally depends on cross-origin popup communication. That compatibility question must be answered through application testing.
Practical Security Scenario
A sensitive application opens or is opened by another origin. Even though the Same-Origin Policy blocks direct cross-origin DOM access, references such as window.opener can create observable state and communication channels. COOP can force cross-origin documents into separate browsing context groups and sever those references.
Now add an OAuth login popup that expects to communicate its completion back to the opener. A strict same-origin policy can change that relationship. The security benefit remains real, but the deployment needs an authentication flow that is compatible with the isolation boundary.
Where This Control Should Be Applied
Apply COOP primarily to top-level HTML documents where opener relationships and site isolation matter. It is not a general API response header and should not be confused with CORS controls for JavaScript access to API data.
Prioritize applications that handle sensitive state, use advanced browser features requiring cross-origin isolation, or want to reduce XS-Leak surface. Before global rollout, classify pages that launch or depend on authentication, payment, file-picker, or support popups and test them individually.
Why COOP Matters
Two top-level pages that share a browsing context group can retain scripting relationships through opener references. That relationship may create cross-origin information channels even when the Same-Origin Policy prevents direct DOM access.
COOP gives the document a way to request stronger separation. MDN notes that opening a document into a new browsing context group severs opener references and can mitigate classes of XS-Leaks.
COOP also participates in cross-origin isolation. Some advanced browser features require Cross-Origin-Opener-Policy: same-origin together with an appropriate Cross-Origin-Embedder-Policy. That makes COOP both a security boundary and, for some applications, a platform capability prerequisite.
COOP Directive Choices
unsafe-none: The default opt-out behavior. It provides the least isolation.same-origin: Separates cross-origin documents and is the common strict policy for cross-origin isolation.same-origin-allow-popups: Allows certain popup relationships while still applying isolation rules; useful only when the workflow requires it.noopener-allow-popups: A newer option for controlling opener relationships in popup-heavy designs; validate browser support and semantics.- Cross-origin isolation: COOP
same-originis commonly paired with COEPrequire-corporcredentiallesswhen cross-origin isolation is required.
Related Ammune guides: Cross-Origin-Embedder-Policy Header Missing, Cross-Origin-Resource-Policy Header Missing, and CORS Misconfiguration.
A Strict COOP Example
For an application that does not depend on cross-origin opener relationships:
Cross-Origin-Opener-Policy: same-originCommon Remediation Mistakes
- Applying
same-originglobally and breaking OAuth or payment popups that communicate with their opener. - Assuming COOP is the same as CORS. COOP groups top-level browsing contexts; CORS governs browser access to cross-origin response data.
- Assuming
rel=noopeneron outbound links replaces a site-wide COOP policy. - Enabling COOP for cross-origin isolation without configuring compatible COEP/CORP or CORS behavior for loaded resources.
- Ignoring differences between application routes that have distinct popup requirements.
How to Fix a Missing COOP Header Safely
1. Map cross-origin window relationships. Search for window.open, window.opener, window.closed, popup polling, cross-window postMessage, and third-party login/payment SDKs.
2. Choose a directive based on those relationships. same-origin provides strong separation. same-origin-allow-popups preserves selected popup relationships for applications that need them. Newer values such as noopener-allow-popups require careful compatibility review.
3. Apply COOP to the top-level documents that need it. Avoid indiscriminate edge injection if login callbacks, partner portals, or special routes have different opener requirements.
4. Test every popup-dependent journey. Exercise SSO, OAuth/OIDC callbacks, payment providers, file pickers, support tools, reports, and any flow that opens another origin and communicates back to the opener.
5. Pair with COEP when isolation is the goal. If the objective is cross-origin isolation, configure the compatible COEP policy, fix resource dependencies, and verify crossOriginIsolated rather than treating COOP alone as sufficient.
Configuration Examples
COOP is best managed per document or route because popup relationships are application-specific. Central edge configuration can work for a uniform application, but only after authentication and payment flows have been tested through the same production path.
NGINX
add_header Cross-Origin-Opener-Policy "same-origin" always;Apache
Header always set Cross-Origin-Opener-Policy "same-origin"Application
Apply COOP per route if login callbacks, payment flows, or popup-based integrations need a different policy from the rest of the application.How to Test the Fix
- Inspect the top-level document response for exactly one valid COOP header.
- Test every popup-based login, federation, payment, file picker, and support workflow.
- Check whether application code relies on
window.opener,window.closed, or postMessage relationships between windows. - If cross-origin isolation is the goal, verify
window.crossOriginIsolatedand validate COEP/CORP/CORS dependencies. - Re-run the ZAP site-isolation rule and review COEP and CORP findings separately rather than treating all three headers as interchangeable.
In addition to inspecting the response header, verify real window behavior. Confirm that untrusted cross-origin pages cannot retain the opener relationship you are trying to eliminate, while approved popup workflows can still detect completion and exchange messages as designed.
How to Think About Severity
ZAP rates 90004-3 as Low and the rule is beta. Missing COOP is normally a browser-isolation hardening gap, not direct proof of data leakage. Its value is higher for applications exposed to XS-Leak-style threats or those that intentionally need cross-origin isolation.
The remediation itself can be disruptive. A policy that breaks federated login or payments creates operational risk, so the security decision should account for both isolation benefit and the legitimate browsing-context relationships the product depends on.
How Ammune Fits
COOP isolates browser windows and opener relationships. Ammune provides visibility into the APIs those windows call, including endpoint discovery, runtime behavior, sensitive data, and abuse patterns.
A browser can correctly isolate a popup and still send valid authenticated API requests afterward. Server-side controls must continue to enforce object ownership, function-level authorization, transaction rules, and anomaly detection independently of COOP.
Production Remediation Checklist
- Inventory
window.open,window.opener, popup polling, and cross-window messaging. - Test OAuth/OIDC, SSO, payment, file-picker, support, and reporting popups.
- Choose
same-originonly when strong browsing-context separation matches product requirements. - Use
same-origin-allow-popupsonly where preserving opener relationships is intentional. - Review compatibility carefully before relying on newer COOP directives.
- Apply the policy to the correct top-level documents rather than every response indiscriminately.
- Pair COOP with COEP when cross-origin isolation is required.
- Verify
window.crossOriginIsolatedfor features that depend on isolation. - Re-run ZAP 90004-3 and review COEP/CORP findings independently.
- Document popup exceptions so future identity or payment changes do not silently weaken the policy.
Frequently Asked Questions
What value should I use for COOP?
same-origin is the common strict choice, but only when the application does not require cross-origin popup relationships that it would break.
Is COOP required for every website?
No. It is a useful isolation control, but the business and browser-functionality impact should be evaluated per application.
Is COOP the same as rel=noopener?
No. rel=noopener affects specific navigations/links, while COOP establishes a response-level policy for browsing context grouping.
Why is COOP related to SharedArrayBuffer?
Cross-origin isolated contexts can gain access to certain high-resolution or shared-memory features, and COOP plus COEP are part of that isolation model.
What is the ZAP alert ID?
Cross-Origin-Opener-Policy Header Missing or Invalid is ZAP alert 90004-3.
Primary References
Isolate Browser Contexts and Protect API Workflows
COOP can separate browsing contexts and popup relationships. Ammune helps protect the API requests those browser contexts generate, including authorization-sensitive and business-critical workflows.
