Skip to content
RCE Disclosed report Advanced

Host `docker` binary overwrite from Kata VM

Kata Containers, used in Bitbucket Pipelines, allowed a VM to write to hostPath mount points that should have been read-only. An attacker could overwrite the host's docker binary, potentially leading to remote code execution.

Bugcrowd

Originally disclosed on Bugcrowd

Critical View original
  • Accepted in 22 days
  • Fixed in 23 days
  • Disclosed after 34 days

Summary by ajxchapman

Kata Containers, as used in the new BitBucket Pipelines CI/CD environment, was found to be vulnerable to an issue allowing Kata VMs to write to hostPath mount points which should have been read only. This issue was fixed in the Kata Containers project and assigned CVE-2020-28914.

Report details

  • Submitted

    26 Oct 2020 18:36:59 UTC

  • Target Location

    Bitbucket Attack Scenarios listed below

  • Target category

    Web App

  • VRT

    Server-Side Injection > Remote Code Execution (RCE)

  • Priority

    P1

  • Bug URL

    Empty

  • Description

    Hi Team,

    I have managed to overwrite the host docker binary (possibly /usr/bin/docker) from within a Kata VM. Unfortunately I had an error in my PoC which meant that I corrupted the original docker binary. I have since managed to replace the binary with a newer version of docker, so things in the Kata environment should continue to work (I hope).

    I will get a report written up today, but unfortunately I have to take a break for childcare right now. I just wanted to give you a heads up that any weirdness you see in the Kata environment is probably my fault.

    Thanks, Alex

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

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 a misconfiguration in Kata Containers that mounted host paths as writable when they should have been read-only.

Impact

An attacker could overwrite the host's docker binary, potentially leading to remote code execution on the host.

What the attacker needed

Access to a Kata VM in Bitbucket Pipelines

The fix

The issue was fixed in the Kata Containers project.

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.

Kata Containers is a system that runs each container inside a lightweight virtual machine for extra isolation. The bug meant that a program inside that virtual machine could write to files on the real host that were supposed to be read-only, like the docker program itself. This could let an attacker replace important host programs with their own code.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.