How I found bug on Google Cloud
The phone verification step on a Google Cloud signup flow trusted fields in the client-side response, so an attacker could tamper with the OTP check response to mark a wrong code as valid. This let the attacker bypass phone verification during signup.
Published on medium.com
Publishing this write-up regarding how I found low hanging fruit bug on google cloud.
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
This is a write-up by Anurag Bhoir about a phone verification OTP bypass found on Google Cloud. The target was the signup and phone verification flow: a user fills in a form, reaches a phone verification page, enters a phone number, requests an OTP by SMS, and then submits the code to complete verification.
The bug class is a phone verification OTP bypass, achieved through response manipulation combined with a logic flaw. The researcher describes it as a low hanging fruit rather than a deep technical vulnerability, and notes it was his first write-up.
Setup
The report does not name any tools used to capture or modify requests. No account details, versions or special preconditions are given other than access to the Google Cloud signup flow and a phone number able to receive the OTP. The researcher's own phone number was used throughout.
Finding it
The researcher chose Google Cloud as the target and first tried for XSS, XXE, SQLi and RCE, without success. He then shifted to low hanging fruit, reasoning that developers concentrate on critical and high severity issues and sometimes overlook the simpler ones. That led him to the signup and verification process.
After filling in the form he reached the phone verification page and started experimenting with it. The first observation came from submitting a wrong OTP and reading the response body.
Exploitation
Step 1: Submit a wrong OTP and read the response
He entered his phone number, clicked send OTP, received the OTP on his phone, but submitted the wrong code 000000 while capturing the request. In the response body he noticed:
"status": "invalid code"
Step 2: Manipulate the status field
He changed the value to:
"status": "Valid code"
and also tried:
"status": "Success"
He forwarded the modified request, but the page did not change. Changing the status string alone was not enough.
Step 3: Capture a valid response for comparison
He started again: entered his valid number, clicked send OTP, and this time submitted the correct OTP so he could analyse and copy the response. The response body contained three pieces of data:
"status": "Success"
"session data": "abcdefghijklmn"
"eti": "qwertyuiop "
Step 4: Replace the whole valid response with the invalid one
He replaced the entire valid response with the invalid response and forwarded it, but again there was no change on the page.
Step 5: Notice that eti varies per number
Looking more closely, he saw that the eti value differed for different mobile numbers. From this he understood the logic behind the verification.
Step 6: Keep eti, replace only status and session data
He started once more: entered a mobile number, clicked send OTP, submitted the wrong OTP 000000 and captured the request. This time he replaced only two values:
"Status": "success"
"session data": "abcdefghijklm"
and left the eti value as it was:
"eti": "hfkscisnii"
With the eti value matching the number under verification, the phone verification page was bypassed.
Root cause
The page's behaviour depended on fields in the response body. The eti value changed per mobile number, while status and session data could be altered in the response. He kept the eti value as it was, replaced only status and session data, and the phone verification page was bypassed. The report does not describe the server-side implementation.
Impact
The researcher passed the phone verification step with a wrong OTP by manipulating the response. The researcher reported the issue immediately and received the reply "Nice Catch". Google raised the severity from P4 to P2 and from S4 to S2, and the researcher was listed on Google's honorable mentions security researchers wall.
Fix
Variants to test
- Multi-field OTP responses: capture a valid response and an invalid one, then try replacing individual fields one at a time while keeping any per-target or per-number token intact. A positive result is the page advancing with a wrong code.
- Per-number tokens: check whether any field in the response changes between phone numbers. If it does, treat it as a binding value and test whether the flow still completes when only the status fields are altered.
- Status string variants: try values such as
Success,successandValid codein the status field. - Whole-response replay: replace the invalid response with a complete valid one captured from the same number. A positive result is the page advancing, which would show the binding token is not actually checked.
- Session data substitution: swap only the session data field between a valid and an invalid response and observe whether the page state changes.
What happened, in plain words
A security researcher, Anurag Bhoir, found a way to skip the phone verification step when signing up for Google Cloud. Normally, after you enter your phone number, Google sends you a one-time code (OTP) by text message, and you must type that code into the page to prove the number is yours. Anurag discovered that by intercepting the response from the server and changing a couple of fields in it, he could make the page believe the code was correct even when he had entered a wrong one. He reported it to Google and was listed on their honorable mentions wall. This is his first public write-up.
Background: what is Google Cloud and why target it?
Google Cloud is a platform where businesses and developers rent computing power, storage, and other services from Google. Signing up involves filling in a form and then verifying your phone number. That verification step is what Anurag attacked.
He chose Google Cloud as his target. In his experience, good targets are:
- Acquisitions (companies Google has bought, which may have separate systems).
- Domains with lots of functionality (more features mean more places for bugs).
- New Google domains (less tested).
- Domains you have read about in other write-ups.
The vulnerability class: OTP bypass by response manipulation
OTP stands for one-time password: a short code sent to your phone that you must enter to prove you own that phone. A bypass means getting past that check without knowing the correct code.
Response manipulation means changing the data that the server sends back to your browser before your browser acts on it. Normally your browser talks to the server, the server replies, and the browser shows you the result. If you can intercept and edit that reply, you can sometimes fool the browser into showing a different result than the server intended.
A logic flaw is a mistake in how the application decides what to do, rather than a technical bug like a crash. Here, changing fields in the response affected the verification page.
How he found it
Anurag first tried to find serious technical bugs: XSS (cross-site scripting, where an attacker injects code into a page), XXE (XML external entity, a way to make a server read files it should not), SQLi (SQL injection, where an attacker inserts database commands), and RCE (remote code execution, where an attacker runs their own commands on the server). He had no luck with those.
So he switched to "low hanging fruit": simpler issues that developers sometimes overlook because they focus on the big, critical bugs. He started looking at the signup and phone verification process.
He filled in the signup form and reached the phone verification page. He decided to experiment with it.
Step by step: how he bypassed the OTP
Step 1: Submit a wrong OTP and capture the response
He entered his own phone number, clicked "send OTP", and received the code on his phone. But instead of entering the correct code, he entered a wrong one: 000000. He captured the request and response. A proxy sits between your browser and the server, letting you see and edit the traffic.
In the response body (the data the server sends back), he saw:
"status": "invalid code"
This is a JSON snippet: JSON is a common format for sending data between a browser and a server, made of field names and values in quotes. Here the field status has the value invalid code, telling the page the code was wrong.
Step 2: Try changing the status field
He changed the value to:
"status": "Valid code"
and also tried:
"status": "Success"
He then forwarded the modified request (sent it on to the browser as if it came from the server). But the page did not change. Changing only the status string was not enough.
Step 3: Capture a valid response for comparison
He started over: entered his valid number, clicked send OTP, and this time submitted the correct OTP so he could see what a successful response looks like. The response body contained three pieces of data:
"status": "Success"
"session data": "abcdefghijklmn"
"eti": "qwertyuiop "
Here status says success, session data looks like a session identifier (a token that ties the request to your current session), and eti is another value. The exact meaning of eti is not explained in the report, but Anurag later noticed it changes with the phone number.
Step 4: Replace the whole valid response with the invalid one
He tried replacing the entire valid response with the invalid response (the one from the wrong code) and forwarded it. Again, the page did not change.
Step 5: Notice that eti varies per phone number
Looking more closely, he saw that the eti value was different for different mobile numbers. From this he understood the logic behind the verification.
Step 6: Keep eti, replace only status and session data
He started once more: entered a mobile number, clicked send OTP, submitted the wrong OTP 000000, and captured the request. This time he replaced only two values:
"Status": "success"
"session data": "abcdefghijklm"
and left the eti value as it was:
"eti": "hfkscisnii"
He kept the eti value as it was, replaced only status and session data, and the phone verification page was bypassed. He could continue without ever entering the correct OTP.
Why it worked (root cause)
The response body contained status, session data and eti, and the researcher altered the first two. The eti value changed per mobile number. Anurag kept the eti value as it was, replaced only status and session data, and the verification page was bypassed.
The report does not describe the server-side implementation.
Impact
The researcher passed the phone verification step with a wrong OTP by manipulating the response. The report does not state what an account created this way could then access, nor whether the bypass worked for numbers the attacker did not control.
What Google did
Anurag reported the issue immediately. Google replied: "Nice Catch🎉". They raised the severity from P4 to P2 and from S4 to S2 (P and S are severity ratings; lower numbers mean more severe). He was listed on Google's honorable mentions security researchers wall.
How to fix it (implied)
Variants to test
If you want to look for similar bugs, here are some ideas based on this report:
- Multi-field OTP responses: capture a valid response and an invalid one, then try replacing individual fields one at a time while keeping any per-target or per-number token intact. A positive result is the page advancing with a wrong code.
- Per-number tokens: check whether any field in the response changes between phone numbers. If it does, treat it as a binding value and test whether the flow still completes when only the status fields are altered.
- Status string variants: try values such as
Success,successandValid codein the status field. - Whole-response replay: replace the invalid response with a complete valid one captured from the same number. A positive result is the page advancing, which would show the binding token is not actually checked.
- Session data substitution: swap only the session data field between a valid and an invalid response and observe whether the page state changes.
Glossary
- OTP (one-time password): a short code sent to your phone that you must enter to prove you own that phone.
- Bypass: getting past a security check without satisfying it.
- Response manipulation: changing the data that a server sends back to your browser before your browser acts on it.
- Logic flaw: a mistake in how an application decides what to do, rather than a technical bug like a crash.
- Proxy: a tool that sits between your browser and the server, letting you see and edit the traffic.
- JSON: a common format for sending data between a browser and a server, made of field names and values in quotes.
- Response body: the data that the server sends back to the browser.
- Session data: a token or identifier that ties a request to your current session.
eti: a value in the response that changes with the phone number; its exact meaning is not explained in the report.- XSS (cross-site scripting): a bug where an attacker injects code into a page.
- XXE (XML external entity): a bug that lets an attacker make a server read files it should not.
- SQLi (SQL injection): a bug where an attacker inserts database commands.
- RCE (remote code execution): a bug that lets an attacker run their own commands on the server.
- P4, P2, S4, S2: severity ratings; lower numbers mean more severe.
- Honorable mentions: a list of researchers who reported valid issues, published by Google.