Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Google Cloud Platform (GCP) Cross Tenant SQL Injection on Spanner and Big Query Through Custom Queries on a Victim’s Data Source in Looker

High

Synopsis

Tenable Research has identified and responsibly disclosed a critical SQL injection vulnerability in Looker Studio. Through the custom query feature, this vulnerability allows an attacker to execute arbitrary SQL queries on a victim's Spanner or BigQuery data sources.

 

The vulnerability exploits a flaw in how Looker Studio validates a user's access to a data source. An attacker could bypass the access check by initially connecting to their own data source, which would return a successful getColumns request. By intercepting and modifying subsequent HTTP requests (createBlockDatasource and publishDatasource), the attacker could swap out their project details and replace them with the victim's, while also embedding a malicious custom SQL query.

 

This malicious report could then be shared with the victim. When the victim viewed the report, the pre-injected SQL query would execute on their data source under their user context, granting the attacker the ability to exfiltrate, insert, or delete all data the victim had access to. This effectively bypasses the single-statement limitation of custom queries and allows for a full compromise of the victim's data with a single action.

 

Proof of Concept

Set up a mock data source for the getColumns HTTP request:

  1. Create a Spanner instance and a db, for example, we will name the instance “attackerspanner” and the db “attackerdb”. Alternatively, just choose a public Spanner table of your choice.

Set up the attacker’s report:

  1. Create a report.
  2. Choose the Spanner connector.
  3. Input the attacker’s project, spanner instance name “attackerspanner”, and the attacker’s DB “attackerdb” or a public spanner. Input a random query that will work on the attacker’s DB, for example “SELECT NULL”
  4. Proxy the HTTP requests, and forward the requests, including the getColumns request.
  5. Intercept the createBlockDatasource and publishDatasource HTTP requests, and change the project name, instance name, and database name to the victim’s details, and also swap the SQL query to the malicious injection you want to inject into the victim’s Spanner (notice the fields are present a couple of times in each request).

Config Block

  1. Click Resource → Manage added data sources → edit the added Spanner data source, and change the credentials to Viewer Credentials.
  2. Add a table to the report by pressing “Add a chart” and choosing a Table.
  3. Choose the added victim’s Spanner data source to be attached to the table chart, the end result should be “No Data Set Access.”
  4. Share the report with the victim, and uncheck the “Notify” checkbox.
  5. (Optional) Make the report embeddable by clicking File → Embed report → check “Enable Embedding” and press Done.
  6. (Optional) Host a website and iframe the report with the granted iframe when allowing embedding, for example:

`<iframe width="600" height="450" src="https://lookerstudio.google.com/embed/reporting/<attacker’s-report-id>/page/MK5LF" frameborder="0" style="border:0" allowfullscreen sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"></iframe>`

  1. Visit the attacker’s site as the victim, and the data will be exfiltrated.

View of SQL statement executed

Solution

Google has fixed the issue.

Disclosure Timeline

June 3, 2025 - Tenable reported the finding to Google, and Google acknowledges
June 11, 2025 - Google asks for more details
June 12, 2025 - Tenable shares more details and attaches an additional POC video
July 2, 2025 - Tenable asks for updates on this issue
July 11, 2025 - Google assigns S1 severity
July 28, 2025 - Tenable asks for updates
July 28, 2025 - Google provides an update regarding the fix, and an end of August ETA
July 31, 2025 - Tenable agrees to delay the disclosure date while Google is actively working
August 11, 2025 - Google says they are still actively working on this and there is no deviation from the end of August ETA
August 12, 2025 - Google awards a bounty
August 17, 2025 - Google updates that the fix should be code complete by the end of the month
September 12, 2025 - Google requests the TRA to be published on 10/01/2025
September 15, 2025 - Tenable agrees to Google's request

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2025-38
Credit:
Liv Matan
Affected Products:
GCP Looker
Risk Factor:
High

Advisory Timeline

October 1, 2025 - Initial Release.
× Contact our sales team