RCE via Gemini Live AI Voice Session Misconfiguration.
A web application minted Gemini Live ephemeral tokens without the live_connect_constraints field, so the browser client could send its own setup frame. An attacker could replace the system instruction and enable the code execution tool, running Python in Google's sandbox.
medium.com
Published on medium.com
A growing number of products are building real-time AI voice features directly into their web applications. The most common pattern is a backend that holds the API credentials and a thin browser client that connects using a short-lived token the backend issues.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The backend created the ephemeral token without live_connect_constraints, so the Constrained endpoint accepted any client-supplied setup frame, including tools and system instruction.
Impact
An attacker could run arbitrary Python in Google's gVisor sandbox and consume compute billed to the API account, but the sandbox blocks outbound network access and the application's own servers, so no direct path to the app's data is shown.
What the attacker needed
A free account with email OTP; victim not required; target uses Gemini Live ephemeral tokens
The fix
The token creation call should include live_connect_constraints with bidi_generate_content_setup, locking the model, system instruction and an empty tools list.
How it was found
- Register an account on the target application.
- Start a voice session and capture the token mint response.
- Confirm the response lacks bidi_generate_content_setup.
- Connect to the WebSocket URL with the token and send a setup frame with a custom system instruction and the code execution tool.
- Receive setupComplete, then send a content frame asking the model to run Python.
- Verify real execution using a nonce and hash proof.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The app gives the browser a short-lived pass to talk to Google's AI voice service. The pass was supposed to say what the browser is allowed to do, but it said nothing, so the browser could ask for extra powers, including running Python code. The code runs in a locked-down sandbox, not on the app's own servers.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.