Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/rancher/rancher
  4. ›
  5. CVE-2024-22036

CVE-2024-22036: Rancher Remote Code Execution via Cluster/Node Drivers

October 25, 2024 (updated April 16, 2025)

A vulnerability has been identified within Rancher where a cluster or node driver can be used to escape the chroot jail and gain root access to the Rancher container itself. In production environments, further privilege escalation is possible based on living off the land within the Rancher container itself. For the test and development environments, based on a –privileged Docker container, it is possible to escape the Docker container and gain execution access on the host system.

This happens because:

  • During startup, Rancher appends the /opt/drivers/management-state/bin directory to the PATH environment variable.
  • In Rancher, the binaries /usr/bin/rancher-machine, /usr/bin/helm_v3, and /usr/bin/kustomize are assigned a UID of 1001 and a GID of 127 instead of being owned by the root user.
  • Rancher employs a jail mechanism to isolate the execution of node drivers from the main process. However, the drivers are executed with excessive permissions.
  • During the registration of new node drivers, its binary is executed with the same user as the parent process, which could enable an attacker to gain elevated privileges by registering a malicious driver.
  • Lack of validation on the driver file type, which allows symbolic links to be used.

Please consult the associated MITRE ATT&CK - Technique - Privilege Escalation and MITRE ATT&CK - Technique - Execution for further information about this category of attack.

Since they run at a privileged level, it is recommended to use trusted drivers only.

References

  • bugzilla.suse.com/show_bug.cgi?id=CVE-2024-22036
  • github.com/advisories/GHSA-h99m-6755-rgwc
  • github.com/rancher/rancher
  • github.com/rancher/rancher/security/advisories/GHSA-h99m-6755-rgwc
  • nvd.nist.gov/vuln/detail/CVE-2024-22036

Code Behaviors & Features

Detect and mitigate CVE-2024-22036 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.7.0 before 2.7.16, all versions starting from 2.8.0 before 2.8.9, all versions starting from 2.9.0 before 2.9.3

Fixed versions

  • 2.7.16
  • 2.8.9
  • 2.9.3

Solution

Upgrade to versions 2.7.16, 2.8.9, 2.9.3 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-269: Improper Privilege Management

Source file

go/github.com/rancher/rancher/CVE-2024-22036.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:39 +0000.