Executive brief
Apollo Embedded Sandbox and Explorer are web-based tools that developers embed into their websites to query and test GraphQL APIs. A missing origin validation flaw in the postMessage handler allows a malicious website to trick a user's browser into sending arbitrary GraphQL queries or mutations (including data modifications) to the victim's GraphQL server while using the victim's authentication credentials, potentially exposing or modifying sensitive data accessible only on private networks.
Technical details
The vulnerability is a Cross-Site Request Forgery (CSRF) attack exploitable via improper postMessage origin validation (CWE-346, CWE-352). The affected components (@apollo/sandbox and @apollo/explorer npm packages, as well as CDN-hosted versions) fail to validate the origin of incoming window.postMessage events, allowing an attacker on a malicious website to craft forged messages that cause the victim's embedded Sandbox/Explorer instance to execute arbitrary GraphQL operations against the victim's GraphQL server. The attack requires user interaction (victim must visit the malicious site) and network reachability to the vulnerable embedded Sandbox/Explorer, but the resulting GraphQL requests are issued directly from the victim's browser with their authentication cookies, making them appear legitimate. An attacker cannot read response data but can trigger mutations with side effects. The vulnerability has been fixed in @apollo/sandbox v2.7.2+ and @apollo/explorer v3.7.3+ by adding strict origin validation to DOM message handling; Apollo has already updated its CDN to serve patched versions.
Affected products
- Apollo Embedded Sandbox before 2.7.2
- Apollo Embedded Explorer before 3.7.3
Timeline
- 2025-09-26: disclosed
- 2025-09-26: patched: @apollo/sandbox v2.7.2+, @apollo/explorer v3.7.3+, and Apollo CDN updated