Miggo Logo

CVE-2021-36776:
Rancher's Steve API Component Improper authorization check allows privilege escalation

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.34277%
Published
4/24/2024
Updated
8/7/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/rancher/ranchergo>= 2.5.0, <= 2.5.92.5.10

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the Steve API proxy not sanitizing impersonation headers before proxying requests to Kubernetes. The primary function responsible for handling HTTP requests in the Steve API proxy is Handler.ServeHTTP in pkg/steve/proxy/proxy.go. Since the flaw explicitly involves improper header handling during proxying, this function is the logical point where the header sanitization should occur. The lack of header filtering here would directly enable the privilege escalation described. While explicit code isn't provided, the component structure and vulnerability mechanics strongly implicate this function.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t * *l*w *is*ov*r** in R*n***r v*rsions *rom *.*.* up to *n* in*lu*in* *.*.* *llows *n *ut**nti**t** us*r to imp*rson*t* *ny us*r on * *lust*r t*rou** t** St*v* *PI proxy, wit*out r*quirin* knowl**** o* t** imp*rson*t** us*r's *r***nti*ls.

Reasoning

T** vuln*r**ility st*ms *rom t** St*v* *PI proxy not s*nitizin* imp*rson*tion *****rs ***or* proxyin* r*qu*sts to Ku**rn*t*s. T** prim*ry *un*tion r*sponsi*l* *or **n*lin* *TTP r*qu*sts in t** St*v* *PI proxy is `**n*l*r.S*rv**TTP` in `pk*/st*v*/prox