Back to list

Missing Cross-Origin-Embedder-Policy

Description

The Cross-Origin-Embedder-Policy (COEP) header ensures that browsers only load cross-origin resources that have granted explicit permission (for example, via CORS). Without COEP, your application cannot enforce full cross-origin isolation, making advanced security features like SharedArrayBuffer usage more risky. Attackers could embed your resources within malicious contexts, potentially exposing sensitive user data or enabling stealthy cross-origin attacks. Furthermore, the absence of COEP can pave the way for side-channel exploits or timing-based attacks where isolation is crucial. Ultimately, failing to implement COEP leaves your site vulnerable to a variety of cross-origin threats and may weaken the overall security posture of your application.

Remediation

Configure the Cross-Origin-Embedder-Policy header in your server settings to 'require-corp' or 'credentialless', ensuring that only resources with appropriate cross-origin permissions can be embedded. Verify that any third-party scripts, iframes, or other assets you rely on set the necessary CORS or CORP headers. If needed, deploy or update a Web Application Firewall (WAF) to watch for and block suspicious or unauthorized cross-origin requests. Regularly review your COEP settings and perform automated tests to confirm that cross-origin isolation remains robust. Maintain consistent header configurations across load balancers, proxies, and any microservices to prevent potential misconfigurations.

References

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policyhttps://web.dev/coep/

Severity

HIGH

Owasp

Code: A05:2021

Category: Security Misconfiguration

Classification

CWE-829
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

7.1

CVSS:4.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

7.1