Apollo Embedded Sandbox and Explorer vulnerable to CSRF via window.postMessage origin-validation bypass
Date: 2025-09
Affected: npm/@apollo/explorer, npm/@apollo/sandbox
Attack vector: auth-bypass
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2025-59845
CWE: CWE-346
CWE-352
CVSS: 8.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N)

### Impact A **Cross-Site Request Forgery (CSRF)** vulnerability was identified in Apollo’s **Embedded Sandbox** and **Embedded Explorer**. The vulnerability arises from missing origin validation in the client-side code that handles `window.postMessage` events. A malicious website can send forged messages to the embedding page, causing the victim’s browser to execute arbitrary GraphQL queries or mutations against their GraphQL server while authenticated with the victim’s cookies. #### Who is impacted Anyone embedding [Apollo Sandbox](https://www.apollographql.com/docs/graphos/platform/sandbox#embedding-sandbox) or [Apollo Explorer](https://www.apollographql.com/docs/graphos/platform/explorer/embed) in their website may have been affected by this vulnerability. - Users who embed Apollo Sandbox or Apollo Explorer in their websites via npm packages (`@apollo/sandbox` and `@apollo/explorer`) or direct links to Apollo’s CDN. - Users running Apollo Router with [embedded Sandbox enabled](https://www.apollographql.com/docs/graphos/routing/configuration/yaml#sandbox). This served the vulnerable code from Apollo’s CDN. - Users running Apollo Server with embedded Sandbox or Explorer enabled. Embedded Sandbox is enabled by default when `NODE_ENV` is not set to `production`, and embedded Sandbox and Explorer can also be enabled in production mode via [landing page plugins](https://www.apollographql.com/docs/apollo-server/api/plugin/landing-pages). This served the vulnerable code from


Mitigations:

Architectural layers (MAESTRO):