Rancher Privilege escalation vulnerability via malicious "Connection" header

Overview

Source
ID
GHSA-pvxj-25m6-7vqr
Aliases
CVE-2021-31999
GO-2024-2778

Description

A vulnerability was discovered in Rancher 2.0.0 through the aforementioned patched versions, where a malicious Rancher user could craft an API request directed at the proxy for the Kubernetes API of a managed cluster to gain access to information they do not have access to. This is done by passing the "Impersonate-User" or "Impersonate-Group" header in the Connection header, which is then correctly removed by the proxy. At this point, instead of impersonating the user and their permissions, the request will act as if it was from the Rancher management server and incorrectly return the information. The vulnerability is limited to valid Rancher users with some level of permissions on the cluster. There is not a direct mitigation besides upgrading to the patched Rancher versions.

Summary

73
Total packages affected
Packages with at least one version that is affected by the advisory or has an affected dependency.
8
Packages with a known fix
Packages with versions affected by the advisory that have a greater version that is not affected.
<0.01%
Total ecosystem affected
The proportion of packages in the ecosystem that are affected by the advisory (fixed or not).
Affected Version: Introduced: 2.0.0, Fixed: 2.4.16, Introduced: 2.5.0, Fixed: 2.5.9
Patched/Unaffected
Affected
v2.2.10+incompatible
v2.2.9+incompatible
v2.2.8+incompatible
v2.2.7+incompatible
v2.2.6+incompatible
v2.2.5+incompatible
v2.2.4+incompatible
v2.2.3+incompatible
v2.2.2+incompatible
v2.2.1+incompatible
v2.2.0+incompatible
v2.1.14+incompatible
v2.1.13+incompatible
v2.1.12+incompatible
v2.1.9+incompatible
v2.1.8+incompatible
v2.1.7+incompatible
v2.1.6+incompatible
v2.1.5+incompatible
v2.1.4+incompatible
v2.1.3+incompatible
v2.1.2+incompatible
v2.1.1+incompatible
v2.1.0+incompatible
v2.0.9+incompatible
v2.0.8+incompatible
v2.0.7+incompatible
v2.0.6+incompatible
v2.0.5+incompatible
v2.0.4+incompatible
v2.0.3+incompatible
v2.0.2+incompatible
v2.0.1+incompatible
v2.0.0+incompatible