█.8x8.vc/index.js: Exposed Google Maps API Key Allowing Potential Abuse of Paid Services
A Google Maps API key was exposed in client-side JavaScript without proper restrictions, allowing potential unauthorised access to paid Google Maps services. This could theoretically lead to API quota consumption and billing concerns, though no exploitation was found.
Originally disclosed on HackerOne
- Triaged in 4 hours
- Fixed in 11 days
- Paid in 43 hours
- Disclosed after 31 days
Summary by the program
We resolved an issue where a Google Maps API key allowed potential unauthorized access to some Google Maps services. While the API key was intentionally included in client-side code, it lacked proper restrictions to prevent abuse of paid services. The potential impact could theoretically lead to API quota consumption and related billing concerns, though actual impact was limited as no evidence of exploitation was found. Our team promptly validated and addressed the report by implementing appropriate API key restrictions where feasible, while accepting other known limitations.
What the report shows
The target is the 8x8 web property *.8x8.vc, and the specific asset named in the title is the client-side file index.js. The weakness class is information disclosure: a Google Maps API key was present in code served to browsers.
The report itself is short, and the platform summary carries most of the detail. The program summary states the key allowed potential unauthorised access to some Google Maps services. The program confirmed the key was intentionally included in client-side code, which is normal for browser-based map integrations, but found that it lacked proper restrictions to prevent abuse of paid services.
The report does not include the request or response that surfaced the key, the key value, the exact URL path beyond index.js, or the Google Maps endpoints that accepted it. There is no reproduction payload in the text, so none is reproduced here.
The outcome, as recorded by the platform:
| Field | Value |
|---|---|
| Severity | Medium |
| CVSS | 6.1 |
| Weakness | Information Disclosure |
| Bounty | 500.00 USD |
| Disclosed | 2025-08-14 |
The program summary says the team validated and addressed the report by implementing appropriate API key restrictions where feasible, while accepting other known limitations. It also states that no evidence of exploitation was found.
Root cause
The program states the key lacked proper restrictions to prevent abuse of paid services. Client-side keys are visible to anyone who loads the page, so secrecy is not the control that protects them. The control is the set of restrictions attached to the key in the Google Cloud console: HTTP referrer restrictions that limit which origins may use the key, and API restrictions that limit which Google Maps services the key may call. The program's summary says the key lacked proper restrictions to prevent abuse of paid services, which points at one or both of those controls being absent or too broad.
Impact
The program describes the potential impact as theoretical: API quota consumption and related billing concerns. In other words, a third party using the key could drive usage against the owner's Google Cloud project and, depending on the billing setup, cost money or exhaust quota that legitimate users need. The program explicitly notes that actual impact was limited because no evidence of exploitation was found. The report does not describe any access to non-public data, any account takeover, or any effect on 8x8 users, and the impact should not be read as extending beyond quota and billing.
How this kind of bug works
Many third-party JavaScript SDKs need a credential in the browser: map providers, analytics, payment widgets, captcha services. The credential has to reach the client, so it is public by construction. Providers therefore expect it to be constrained rather than hidden. For Google Maps platform keys, the usual constraints are:
- Application restrictions. An HTTP referrer restriction lists the origins allowed to use the key, so a copy of the key used from another site is rejected.
- API restrictions. The key is limited to the specific APIs the application needs, so a key embedded for Maps JavaScript cannot be used against unrelated, more expensive services.
- Quotas and budget alerts. Per-key or per-project quotas cap the damage if a key does leak, and billing alerts surface unexpected consumption.
The bug class arises when a key is issued without these constraints, or with a wildcard referrer, or when a key created for one purpose is reused across services. The exposure is then not the string itself but the absence of the guardrails around it. A related failure is a key that is restricted for the browser but also usable from server-side APIs that do not enforce referrer checks, which is why API restrictions matter independently of referrer restrictions.
How to test for it
This is largely a review and validation exercise rather than an exploitation one.
- Locate candidate keys. Fetch the JavaScript bundles and HTML of the target and search for provider-specific key patterns, for example strings beginning with the Google API key prefix, or configuration objects that pass a key to a maps loader. Source maps, if published, make this faster.
- Identify the provider and the intended API. Read the surrounding code to see which service the key is meant for: Maps JavaScript, Static Maps, Geocoding, Places and so on.
- Test the referrer restriction. Replay a request to the intended API from a context with no
Refererheader, and from an unrelated origin if you can arrange one. A key with a proper referrer restriction should reject both. A key that answers successfully is a candidate finding. - Test the API restriction. Call a different, billable API from the same family with the same key. If the key was meant only for the browser maps SDK but also answers a server-side geocoding or places request, the API restriction is missing or too broad.
- Confirm the response is real. A successful response should contain actual service data, not an error object. Google returns structured error payloads with a status field for rejected requests, so read the body rather than the HTTP status alone.
Common false positives:
- The key is restricted but your test client sent an allowed referrer, for example because a proxy or browser extension added one.
- The endpoint returns an error page that looks like data but is a quota or billing rejection.
- The key is a public, documented demo key or belongs to a different project than the target.
- The key is restricted to an API you did not test, so a rejection on one service says nothing about another.
How it is fixed
The standard fix is to constrain the key rather than remove it, since the client needs it:
- Apply HTTP referrer restrictions listing only the production origins that legitimately load the key.
- Apply API restrictions so the key can call only the APIs the feature uses.
- Set quotas and budget alerts on the project so unexpected consumption is capped and visible.
- Rotate the key if it was ever unrestricted, and audit other keys in the same project for the same gap.
Where a provider supports it, a short-lived token minted by the backend is preferable to a long-lived static key, because it limits the window in which a leaked credential is useful.
Hunting notes
Keys of this kind tend to hide in JavaScript bundles, inline configuration objects, mobile app packages, and public repositories that mirror front-end code. Recon signals worth watching: third-party SDK loader scripts in page source, configuration endpoints that return client settings, and source maps that expose unminified initialisation code. Any target that embeds maps, captcha, analytics or payment widgets is a candidate.
To get a report accepted, show the key is genuinely usable beyond its intended context: demonstrate a successful call to a billable API from an origin or client the key should not serve, and state the cost or quota consequence in the program's own terms. Avoid claiming data exposure you cannot show. Programs are more likely to triage a report that demonstrates a concrete, bounded impact, such as a successful billable call, than one that only shows a string in a bundle.
What happened, in plain words
8x8 runs a website at *.8x8.vc. One of the files that website sends to visitors' browsers is called index.js. That file contained a Google Maps API key.
An API key is a short string of characters that identifies an application to a service. Think of it like a membership card: the service sees the card and knows which account to charge and which permissions to apply. Google Maps is a paid service, so every time a page asks Google for a map, Google records the request against the account that owns the key.
The program summary states the key allowed potential unauthorised access to some Google Maps services. The program agreed the key was in the file on purpose, which is normal: a map drawn in the browser needs a key in the browser. But the program also found the key lacked proper restrictions to prevent abuse of paid services.
That is the whole finding. The report does not include the request or response that surfaced the key, the key value itself, the exact URL path beyond index.js, or the Google Maps endpoints that accepted it. There is no reproduction payload in the text, so none is reproduced here.
The outcome, as recorded by the platform:
| Field | Value |
|---|---|
| Severity | Medium |
| CVSS | 6.1 |
| Weakness | Information Disclosure |
| Bounty | 500.00 USD |
| Disclosed | 2025-08-14 |
Information disclosure means information that should have been kept under control was visible to people who should not have had it. Here the information is the key, and the problem is not that it was visible but that nothing limited what a stranger could do with it.
The program summary says the team validated and addressed the report by implementing appropriate API key restrictions where feasible, while accepting other known limitations. It also says no evidence of exploitation was found.
In general, how this kind of bug works
Many services that run in a browser need a credential in the browser: map providers, analytics tools, payment widgets, captcha services. The credential has to reach the visitor's computer, so anyone can read it. Providers know this, so they expect the key to be constrained rather than hidden.
For Google Maps platform keys, the usual constraints are:
- Application restrictions. An HTTP referrer restriction lists the websites allowed to use the key. The referrer is a header the browser sends with a request saying which page made it. If a copy of the key is used from another site, Google rejects the request.
- API restrictions. The key is limited to the specific Google services the application needs. A key embedded for the browser maps feature cannot then be used against unrelated, more expensive services.
- Quotas and budget alerts. A quota is a cap on how many requests an account may make in a period. Budget alerts warn the owner when spending rises unexpectedly.
The bug appears when a key is issued without these constraints, or with a referrer rule so broad it matches any site, or when a key made for one purpose is reused across services. The exposure is not the string itself but the absence of the guardrails around it.
How to test for it
This is mostly a review and validation exercise rather than an attack.
- Locate candidate keys. Download the JavaScript files and HTML pages of the target and search for provider-specific patterns, for example strings beginning with the Google API key prefix, or configuration objects that pass a key to a maps loader. Source maps, if published, make this faster. A source map is a file that maps compressed code back to readable original code.
- Identify the provider and the intended API. Read the surrounding code to see which service the key is meant for: Maps JavaScript, Static Maps, Geocoding, Places and so on.
- Test the referrer restriction. Send a request to the intended API from a context with no
Refererheader, and from an unrelated site if you can arrange one. A key with a proper referrer restriction should reject both. A key that answers successfully is a candidate finding. - Test the API restriction. Call a different, billable API from the same family with the same key. If the key was meant only for the browser maps feature but also answers a server-side geocoding or places request, the API restriction is missing or too broad.
- Confirm the response is real. A successful response should contain actual service data, not an error object. Google returns structured error payloads with a status field for rejected requests, so read the body rather than the HTTP status alone.
Common false positives:
- The key is restricted but your test client sent an allowed referrer, for example because a proxy or browser extension added one.
- The endpoint returns an error page that looks like data but is a quota or billing rejection.
- The key is a public, documented demo key or belongs to a different project than the target.
- The key is restricted to an API you did not test, so a rejection on one service says nothing about another.
How it is fixed
The standard fix is to constrain the key rather than remove it, since the browser needs it:
- Apply HTTP referrer restrictions listing only the production sites that legitimately load the key.
- Apply API restrictions so the key can call only the APIs the feature uses.
- Set quotas and budget alerts on the project so unexpected consumption is capped and visible.
- Rotate the key if it was ever unrestricted, and audit other keys in the same project for the same gap. Rotating means replacing it with a new one and retiring the old.
Where a provider supports it, a short-lived token minted by the backend is preferable to a long-lived static key, because it limits the window in which a leaked credential is useful.
Hunting notes
Keys of this kind tend to hide in JavaScript bundles, inline configuration objects, mobile app packages, and public repositories that mirror front-end code. Signals worth watching: third-party SDK loader scripts in page source, configuration endpoints that return client settings, and source maps that expose unminified initialisation code. Any target that embeds maps, captcha, analytics or payment widgets is a candidate.
To get a report accepted, show the key is genuinely usable beyond its intended context: demonstrate a successful call to a billable API from a site or client the key should not serve, and state the cost or quota consequence in the program's own terms. Avoid claiming data exposure you cannot show. Programs are more likely to triage a report that demonstrates a concrete, bounded impact, such as a successful billable call, than one that only shows a string in a bundle.
Glossary
- API: a way for one piece of software to ask another for data or an action, here a page asking Google for map data.
- API key: a string that identifies an application to a service and links its requests to an account.
- API restriction: a rule limiting which services a key may call.
- Application restriction: a rule limiting where a key may be used, such as which websites.
- Billing: the charges a service makes to the account that owns a key.
- Budget alert: a notification sent when spending reaches a set level.
- Client-side: code that runs in the visitor's browser rather than on the server.
- Credential: any secret or identifier used to prove identity to a service.
- CVSS: a scoring system that rates the severity of a vulnerability.
- Geocoding: turning a street address into map coordinates, or the reverse.
- HTTP referrer: a header the browser sends saying which page made a request.
- Information disclosure: a weakness where information becomes visible to people who should not have it.
- JavaScript bundle: one file containing much of a website's code, sent to the browser.
- Quota: a cap on how many requests an account may make in a period.
- Request: a message a browser or program sends to a server asking for something.
- Response: the message a server sends back.
- Rotate: replace a credential with a new one and retire the old.
- Severity: how serious a vulnerability is judged to be.
- Source map: a file that maps compressed code back to readable original code.
- Token: a credential, often short-lived, used in place of a permanent key.
- Vulnerability: a weakness in software that can be misused.