Skip to content
Access control Disclosed report Beginner

Broken Github Link Used in deployment docs of "github.com/kubernetes/kompose"

A Kubernetes documentation page instructed users to clone an example project from a GitHub account that was not registered, allowing an attacker to register that account and host malicious code. Users following the setup steps would clone and potentially execute the attacker's code.

codermak Follow

Originally disclosed on HackerOne

  • Triaged in 4 hours
  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 34 days

Report Submission Form

Summary:

Kubernetes have a github project github.com/kubernetes/kompose In the project there is a doc which have installation steps In the steps, doc is referring to another github account repository to clone it and install. But the github account was not registered on github.com So I was able to takeover the account and host PoC

Kubernetes Version:

NA

Component Version:

NA

Steps To Reproduce:

  1. Go to https://github.com/kubernetes/kompose/blob/master/docs/maven-example.md
  2. Search for Clone the example project from GitHub
  3. You will see this clone command $ git clone https://github.com/piyush1594/kompose-maven-example.git
  4. Try accessing the repository using the link https://github.com/piyush1594/kompose-maven-example you will see the takeover message.

Supporting Material/References:

Screenshot_from_2021-11-12_13-04-24.png
Screenshot_from_2021-11-12_13-04-24.png From the original on HackerOne

Impact

An attacker can takeover the github repository and host malicious code on it. When any user will follow the setup steps and clone the repository, it will end up pulling code from attacker's controlled repository. When user will try running further setup steps, it will end up executing attackers malicious code, which can lead to RCE.

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

The documentation referenced a GitHub repository under an unregistered username, creating a dangling reference that could be claimed by anyone.

Impact

An attacker could host malicious code in the claimed repository, and users following the setup steps could clone and execute it, potentially leading to remote code execution.

What the attacker needed

Unregistered GitHub account referenced in docs; victim follows documentation steps

How it was found

  1. Open the Kubernetes kompose documentation page for the Maven example.
  2. Find the instruction to clone the example project from GitHub.
  3. Note the clone command pointing to a repository under an unregistered GitHub account.
  4. Visit the repository link and observe the takeover message.

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 documentation page told people to download example code from a GitHub address that did not exist yet. Anyone could create that GitHub account and put their own harmful code there. People following the guide would then download and run that harmful code.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

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.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.