Controlling the Google Assistant via Web Speech API (Awarded $3133.7)
When the Google Assistant is opened with a deeplink, it should require manually pressing on the microphone icon to start listening per https://feed.bugs.xdavidhu.me/bugs/0011 (unless “OK Google” is enabled). However, if anything opens the com.google.android.apps.googleassistant app like with the…
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.
Context
Google Assistant on Android can be opened from a web page through a deeplink. The expected behaviour, as documented in an earlier public report at https://feed.bugs.xdavidhu.me/bugs/0011, is that when the Assistant is opened this way it should require the user to press the microphone icon manually before it starts listening. The exception is when "OK Google" hotword detection is enabled.
The target here is the Android app com.google.android.apps.googleassistant, reached from a web page through the market://launch?id=com.google.android.apps.googleassistant deeplink, a BROWSABLE intent. The write-up links to an earlier report about launching Google Assistant with a deeplink.
Setup
The write-up does not describe any accounts, roles, tool versions or special tooling.
Finding it
The researcher noticed that the manual microphone confirmation is not enforced when the Assistant is opened through the market://launch?id=com.google.android.apps.googleassistant deeplink. Instead of waiting for a tap on the microphone icon, the app automatically activates the microphone. That removes the protection described in the earlier report and lets a page drive a spoken conversation with the Assistant through the Web Speech API.
Exploitation
Step 1: Serve a page that speaks and opens the Assistant
The whole exploit is a single HTML page. The user clicks anywhere on it and then waits.
<h1>Click anywhere and wait.</h1>
<script>
onclick = () => {
const utterance = new SpeechSynthesisUtterance('Turn on airplane mode');
setInterval(() => {
if (speechSynthesis.speaking) return;
speechSynthesis.speak(utterance);
}, 2000);
open('market://launch?id=com.google.android.apps.googleassistant');
};
</script>
The important parts:
onclickmakes the whole page a trigger, so a single tap anywhere starts the chain.new SpeechSynthesisUtterance('Turn on airplane mode')builds the phrase the page wants the Assistant to hear. In the write-up this is the example command.- The
setIntervalcallback runs every 2000 ms. It skips the turn ifspeechSynthesis.speakingis already true, and otherwise callsspeechSynthesis.speak(utterance). open('market://launch?id=com.google.android.apps.googleassistant')launches the Assistant app through the deeplink.
Step 2: The Assistant starts listening without confirmation
Because the app was opened through the deeplink, it activates the microphone automatically rather than waiting for the microphone icon to be pressed. The report says the Web Speech API can have a chat with the Assistant.
Root cause
When the app is launched through the market://launch?id=com.google.android.apps.googleassistant BROWSABLE intent, that step is skipped and the microphone is activated automatically. The write-up does not go into the app-side code, so the exact reason the deeplink path bypasses the check is not stated;
Impact
A web page could cause the Google Assistant to activate the microphone without the user pressing the microphone icon. The write-up frames the impact as similar to the previous report about using a deeplink to launch Google Assistant. The example command used is "Turn on airplane mode", but the write-up does not enumerate what the Assistant would or would not carry out.
The report notes the "OK Google" exception: the manual microphone step is not expected when hotword detection is enabled, so the bypass matters for the configuration where it is not.
Fix
The write-up does not describe a fix or a change made by Google.
Variants to test
- Other BROWSABLE intents that launch an app with a voice or listening mode. A positive result is the app starting to listen without the user pressing a microphone control.
- Other deeplink schemes that open the same Assistant app. A positive result is the same automatic microphone activation through a different entry point.
- Pages that keep speech synthesis running while the target app launches, as in the interval above. A positive result is the app transcribing or acting on the synthesised phrase.
- The same pattern against other voice assistants reachable by deeplink. A positive result is a listening session started without the expected user confirmation.
Reward
The report was originally awarded $500 by Abuse VRP, like the Android lockscreen data leak, and $2633.70 was added after checking they got it right the first time, for a total of $3133.70.
What happened, in plain words
A web page can open the Google Assistant app on an Android phone. Normally, when the Assistant is opened this way, it should wait for the person to tap the microphone icon before it starts listening. The researcher found that opening the app through a particular kind of link skips that step: the Assistant turns the microphone on by itself. Because the same web page can also make the phone speak out loud, the page can talk to the Assistant without the person ever pressing anything. The example phrase used in the write-up is "Turn on airplane mode".
Google paid $3133.70 for the report.
Background you need first
A few ideas come up again and again below, so here they are from zero.
- Android app: a program installed on a phone. Each app has a package name, a unique identifier written like a web address in reverse. The Google Assistant app's package name is
com.google.android.apps.googleassistant. - Deeplink: a link that opens a specific app instead of a web page, the way a normal link opens a website. Think of it as a doorbell that rings directly in one flat rather than in the building's main lobby.
- Intent: Android's word for a request to do something, such as "open this app". A BROWSABLE intent is one that a web browser is allowed to trigger from a page. That is the key detail here: a website can ring that doorbell.
market://scheme: a link format used on Android to reach the app store and app launches. The link in this report ismarket://launch?id=com.google.android.apps.googleassistant.- API: an interface one program offers so another program can use its features. A restaurant menu is the usual comparison: you do not walk into the kitchen, you order from the list the kitchen publishes.
- Web Speech API: a feature built into browsers that lets a web page turn text into spoken audio. The part used here is called
speechSynthesis, the browser's text-to-speech engine. - Microphone confirmation: a safety step where the app refuses to listen until the person taps the microphone icon. It exists so that a page cannot quietly start a conversation with your voice assistant.
- Hotword: a wake phrase such as "OK Google". When hotword detection is switched on, the Assistant is already designed to listen for that phrase, so the manual tap is not expected in that configuration.
Context
Google Assistant on Android can be opened from a web page through a deeplink. An earlier public report, at https://feed.bugs.xdavidhu.me/bugs/0011, documents the behaviour that is supposed to happen: when the Assistant is opened this way, it should require the user to press the microphone icon manually before it starts listening. The exception is when "OK Google" hotword detection is enabled.
The target here is the Android app com.google.android.apps.googleassistant, reached from a web page through the market://launch?id=com.google.android.apps.googleassistant deeplink, a BROWSABLE intent. The write-up links to an earlier report about launching Google Assistant with a deeplink.
Setup
The write-up does not describe any accounts, roles, tool versions or special tooling.
Finding it
The researcher noticed that the manual microphone confirmation is not enforced when the Assistant is opened through the market://launch?id=com.google.android.apps.googleassistant deeplink. Instead of waiting for a tap on the microphone icon, the app automatically activates the microphone. That removes the protection described in the earlier report and lets a page drive a spoken conversation with the Assistant through the Web Speech API.
Exploitation
Step 1: Serve a page that speaks and opens the Assistant
The whole exploit is a single HTML page. The user clicks anywhere on it and then waits.
<h1>Click anywhere and wait.</h1>
<script>
onclick = () => {
const utterance = new SpeechSynthesisUtterance('Turn on airplane mode');
setInterval(() => {
if (speechSynthesis.speaking) return;
speechSynthesis.speak(utterance);
}, 2000);
open('market://launch?id=com.google.android.apps.googleassistant');
};
</script>
Line by line, in plain words:
<h1>Click anywhere and wait.</h1>is the only thing the visitor sees: a heading telling them to tap the page and then be patient.<script>starts the block of JavaScript, the code the browser runs.onclick = () => {makes the whole page a trigger. A single tap anywhere starts the chain.const utterance = new SpeechSynthesisUtterance('Turn on airplane mode');builds the phrase the page wants the Assistant to hear. In the write-up this is the example command.SpeechSynthesisUtteranceis the Web Speech API object that holds a piece of text to be spoken.setInterval(() => {starts a timer that runs the code inside it again and again, every 2000 milliseconds, that is every two seconds.if (speechSynthesis.speaking) return;checks whether the browser is already talking. If it is, the code stops for this turn and does nothing, so the phrase is not queued twice on top of itself.speechSynthesis.speak(utterance);makes the phone say the phrase out loud.}, 2000);closes the timer and sets the two-second interval.open('market://launch?id=com.google.android.apps.googleassistant');launches the Assistant app through the deeplink.open()is the browser function that opens a link, here amarket://link rather than a web address.};and</script>close the click handler and the script block.
Step 2: The Assistant starts listening without confirmation
Because the app was opened through the deeplink, it activates the microphone automatically rather than waiting for the microphone icon to be pressed. The report says the Web Speech API can have a chat with the Assistant.
Root cause
When the app is launched through the market://launch?id=com.google.android.apps.googleassistant BROWSABLE intent, that step is skipped and the microphone is activated automatically. The write-up does not go into the app-side code, so the exact reason the deeplink path bypasses the check is not stated;
Impact
A web page could cause the Google Assistant to activate the microphone without the user pressing the microphone icon. The write-up frames the impact as similar to the previous report about using a deeplink to launch Google Assistant. The example command used is "Turn on airplane mode", but the write-up does not enumerate what the Assistant would or would not carry out.
The report notes the "OK Google" exception: the manual microphone step is not expected when hotword detection is enabled, so the bypass matters for the configuration where it is not.
Fix
The write-up does not describe a fix or a change made by Google.
Variants to test
- Other BROWSABLE intents that launch an app with a voice or listening mode. A positive result is the app starting to listen without the user pressing a microphone control.
- Other deeplink schemes that open the same Assistant app. A positive result is the same automatic microphone activation through a different entry point.
- Pages that keep speech synthesis running while the target app launches, as in the interval above. A positive result is the app transcribing or acting on the synthesised phrase.
- The same pattern against other voice assistants reachable by deeplink. A positive result is a listening session started without the expected user confirmation.
Reward
The report was originally awarded $500 by Abuse VRP, like the Android lockscreen data leak, and $2633.70 was added after checking they got it right the first time, for a total of $3133.70.
Glossary
- Android: the mobile operating system made by Google that runs on many phones.
- API: an interface one program offers so another program can use its features, like ordering from a menu instead of entering the kitchen.
- BROWSABLE intent: an Android request to open something that a web browser is allowed to trigger from a web page.
- Deeplink: a link that opens a specific app rather than a web page.
- Hotword: a wake phrase such as "OK Google" that a voice assistant listens for.
- HTML: the language web pages are written in.
- Intent: Android's word for a request to perform an action, such as opening an app.
- JavaScript: the programming language browsers run inside web pages.
market://scheme: an Android link format used to reach the app store and app launches.- Microphone confirmation: the safety step where the Assistant waits for a tap on the microphone icon before listening.
- Package name: the unique identifier of an Android app, written like a reversed web address.
speechSynthesis: the part of the Web Speech API that turns text into spoken audio in the browser.SpeechSynthesisUtterance: the Web Speech API object that holds a piece of text to be spoken.- User gesture: a real action by the person, such as a tap or click, that browsers require before allowing certain actions.
- Web Speech API: a browser feature that lets a web page turn text into speech.
- Write-up: a public description of a security report and how it was found.