Skip to main content
InfoHeadersOWASP A05:2021CWE-693

How to fix: Script Relies on Cross-Origin Isolation That COEP Prevents

An inline script branches on cross-origin isolation, by reading window.crossOriginIsolated or waiting on Atomics, but Cross-Origin-Embedder-Policy is set to a value that keeps isolation off, so that flag is permanently false and the branch behind it never runs.

Why it matters

The isolation-dependent path is dead code the author most likely believes is live. Whatever it guards, a faster timer, a threaded WebAssembly module, a shared memory worker, silently never happens, and the fallback runs on every browser instead of none.

Cross-origin isolation requires COEP require-corp or credentialless TOGETHER with COOP same-origin. COEP unsafe-none is the browser default and is the correct setting for the overwhelming majority of sites: require-corp blocks every cross-origin resource that does not opt in with a Cross-Origin-Resource-Policy header, which typically breaks fonts, payment iframes and analytics. This is reported only when a script shows it expects isolation, never for the default value on its own.

How to fix it

  1. 1Decide which one is wrong: the header or the script. Most of the time it is the script, and the isolation-dependent branch should be removed.
  2. 2If you genuinely need isolation, set Cross-Origin-Embedder-Policy: credentialless and Cross-Origin-Opener-Policy: same-origin, then verify window.crossOriginIsolated is true.
  3. 3Before enabling it, confirm every cross-origin resource you load sends Cross-Origin-Resource-Policy, or it will stop loading. Fonts, payment iframes and embedded third-party viewers are the usual casualties.
  4. 4Prefer credentialless over require-corp: it loads non-cooperating resources without credentials rather than blocking them outright.

Code examples

Header

HTTP
Cross-Origin-Embedder-Policy: credentialless

References

Detected automatically by VulnRadar. The check id is coep-credentialless, stable across every scan so you can filter or diff on it.

See every headers check

Questions

How severe is Script Relies on Cross-Origin Isolation That COEP Prevents?
VulnRadar rates this info severity in the headers 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 coep-credentialless, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Script Relies on Cross-Origin Isolation That COEP Prevents map to?
It maps to CWE-693. In the OWASP Top 10 it falls under A05: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.

Propose a checkHow a check is built

Scan your own site for script relies on cross-origin isolation that coep prevents

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Script Relies on Cross-Origin Isolation That COEP Prevents | VulnRadar