High, CVSS 8.2npmAmendedPublished
Apollo Embedded Sandbox and Explorer vulnerable to CSRF via window.postMessage origin-validation bypass
CVE-2025-59845 · GHSA-w87v-7w53-wwxv
- Affected
- npm @apollo/sandbox < 2.7.2
- Fixed in
- 2.7.2· Vendor fix available
- Issue
- 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 or Apollo Explorer 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. 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 NODEENV is…
Recommended action: Upgrade to 2.7.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.