Skip to content
Access control Write-up Advanced

CVE-2018-1002105: Critical Vulnerability in Kubernetes API Server

The Kubernetes API server's proxy request handling could leave a TCP connection open after an error response, allowing an attacker to send arbitrary requests over that connection to the backend server, authenticated with the API server's TLS credentials. This could escalate privileges to perform any API request against an aggregated API server or the kubelet API.

github.com

Published on github.com

CVE-2018-1002105: proxy request handling in kube-apiserver can leave vulnerable TCP connections#71411

The author, on github.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the proxy did not properly close the backend connection after an error response, leaving it open for reuse.

Impact

An attacker could escalate from a simple API call to performing any API request against an aggregated API server or the kubelet API, potentially running arbitrary commands in pods, though this requires the backend to be directly accessible from the API server's network.

What the attacker needed

Kubernetes cluster with aggregated API servers or pod…; Backend server directly accessible from API server network; Authorized to make API calls (even anonymous discovery)

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 write-up has not been written yet. The Original tab links to the source.

The Kubernetes API server acts as a middleman that lets users talk to other services (like a metrics server or the kubelet on a node). Normally, it checks permissions and then forwards the request. A bug meant that after an error, the connection to the backend stayed open, so a user could sneak extra requests directly to the backend, using the API server's own credentials. This let them do things they shouldn't, like run commands in other pods.

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.

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.