Skip to content
XSS Disclosed report Beginner

Google storage bucket takeover which is used to load JS file in dashboard.html in "github.com/kubernetes/release" which can lead to XSS

A Google Cloud Storage bucket referenced by a Kubernetes dashboard HTML file was unclaimed, allowing an attacker to register it and host arbitrary content. Loading a malicious JavaScript file from the bucket could execute script in the dashboard, and the JSON data fetched from the bucket could be controlled by the attacker.

codermak Follow

Originally disclosed on HackerOne

Medium 5.3 View original
  • Triaged in 4 days
  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 34 days

Report Submission Form

Summary:

Kubernetes have a github repository github.com/kubernetes/release In the repository there is code for dashboard. The dashboard have a html file dashboard.html which is using a JS file from a google storage bucket. The bucket was not registered on google cloud. So I was able to takeover the bucket and host PoC

Kubernetes Version:

NA

Component Version:

NA

Steps To Reproduce:

  1. Go to https://github.com/kubernetes/release/blob/master/cmd/vulndash/dashboard.html#L6
  2. You will see this google storage bucket storage.googleapis.com/k8s-artifacts-prod-vuln-dashboard getting used at line 6
  3. Try accessing the bucket using this url https://storage.googleapis.com/k8s-artifacts-prod-vuln-dashboard/takeover.html
  4. You will see a base64 string, try decoding the string you will see takeover message.
  5. Bucket is also getting used to load some data from JSON file here https://github.com/kubernetes/release/blob/master/cmd/vulndash/dashboard.js#L1

Supporting Material/References:

curl -s https://storage.googleapis.com/k8s-artifacts-prod-vuln-dashboard/takeover.html | base64 --decode
Screenshot_from_2021-11-12_17-29-02.png
Screenshot_from_2021-11-12_17-29-02.png From the original on HackerOne
Screenshot_from_2021-11-12_17-32-10.png
Screenshot_from_2021-11-12_17-32-10.png

Impact

An attacker can takeover the bucket and host maliicous JS file on it, when the js file will get loaded on the dashboard, it will run the malicious JS code which can also lead to XSS attacks. Also, when the dashboard.js file tries to call the storage bucket to get the json data, that attacker will be able to control and can return malicious or misguiding or misleading information

The original report as published on HackerOne, by codermak. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the dashboard referenced a cloud storage bucket that was never registered, so an attacker could claim it and serve arbitrary content.

Impact

An attacker could host a malicious JavaScript file that runs in the dashboard, leading to XSS, and could control the JSON data returned to the dashboard.

What the attacker needed

Bucket is unclaimed; victim visits the dashboard

How it was found

  1. Open the dashboard HTML file in the repository and find the storage bucket URL on line 6.
  2. Access the bucket URL to see the takeover page.
  3. Decode the base64 string on that page to read the takeover message.
  4. Note that the dashboard JavaScript also loads JSON data from the same bucket.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A dashboard page loaded a script from a cloud storage bucket nobody had claimed. Anyone could create that bucket and put files there. When someone opened the dashboard, the attacker's script could run, which could lead to XSS.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by codermak

View all

10 more disclosed reports, best first.

More from Kubernetes

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.