# GHSA-x7xj-jvwp-97rv: RKE2 allows privilege escalation in Windows nodes due to Insecure Access Control Lists

> Weak ACLs on Windows RKE2 nodes allow low-privileged users to modify sensitive files, leading to privilege escalation.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Oct 2024
- **Also known as:** GO-2024-3222

## What is GHSA-x7xj-jvwp-97rv?

GHSA-x7xj-jvwp-97rv is a vulnerability in github.com/rancher/rke2, published on 25 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

### Impact

A vulnerability has been identified whereby RKE2 deployments in Windows nodes have weak Access Control Lists (ACL), allowing `BUILTIN\Users` or `NT AUTHORITY\Authenticated Users` to view or edit sensitive files which could lead to privilege escalation.

The affected files include binaries, scripts, configuration and log files:

```
C:\etc\rancher\node\password
C:\var\lib\rancher\rke2\agent\logs\kubelet.log
C:\var\lib\rancher\rke2\data\v1.**.**-rke2r*-windows-amd64-*\bin\*
C:\var\lib\rancher\rke2\bin\*
```

**This vulnerability is exclusive to RKE2 in Windows environments. Linux environments are not affected by it.**

Please consult the associated [MITRE ATT&CK - Technique - Exploitation for Privilege Escalation](https://attack.mitre.org/techniques/T1068/) for further information about this category of attack.

### Patches

Patched versions include RKE2 `1.31.0`, `1.30.2`, `1.29.6`, `1.28.11` and `1.27.15`.

### Workarounds

Users are advised to do a fresh install of their RKE2 Windows nodes using a patched RKE2 version. 
When that is not possible, users can enforce stricter ACLs for all sensitive files affected by this Security Advisory running [this](https://github.com/rancherlabs/support-tools/blob/master/windows-access-control-lists/README.md) PowerShell script as an Administrator on each node.

### References

- [CVE-2023-32197](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-32197)
- [Rancher Manager’s GHSA-7h8m-pvw3-5gh4](https://github.com/rancher/rancher/security/advisories/GHSA-7h8m-pvw3-5gh4)

### For more information

If you have any questions or comments about this advisory:

- Reach out to the [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries.
- Open an issue in the [Rancher](https://github.com/rancher/rancher/issues/new/choose) repository.
- Verify with our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).

## Which versions are affected by GHSA-x7xj-jvwp-97rv?

9 open source packages ship an affected version, including github.com/rancher/rke2.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/rancher/rke2` | Go | All versions | None |
| `github.com/rancher/rke2` | Go | From 1.27.0 | 1.27.15 |
| `github.com/rancher/rke2` | Go | From 1.27.0 | 1.27.15 |
| `github.com/rancher/rke2` | Go | From 1.28.0 | 1.28.11 |
| `github.com/rancher/rke2` | Go | From 1.28.0 | 1.28.11 |
| `github.com/rancher/rke2` | Go | From 1.29.0 | 1.29.6 |
| `github.com/rancher/rke2` | Go | From 1.29.0 | 1.29.6 |
| `github.com/rancher/rke2` | Go | From 1.30.0 | 1.30.2 |
| `github.com/rancher/rke2` | Go | From 1.30.0 | 1.30.2 |

## How do I fix GHSA-x7xj-jvwp-97rv?

Upgrade github.com/rancher/rke2 to a fixed version for your release line: 1.27.15, 1.28.11, 1.29.6 or 1.30.2.

## Is GHSA-x7xj-jvwp-97rv being exploited?

There is no known exploitation of GHSA-x7xj-jvwp-97rv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x7xj-jvwp-97rv and fix it if it is affected.

What it is: GHSA-x7xj-jvwp-97rv is a vulnerability in github.com/rancher/rke2, published on 25 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-x7xj-jvwp-97rv in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/rancher/rke2 (Go): affected all versions; no fix listed
- github.com/rancher/rke2 (Go): affected from 1.27.0; fixed in 1.27.15
- github.com/rancher/rke2 (Go): affected from 1.27.0; fixed in 1.27.15
- github.com/rancher/rke2 (Go): affected from 1.28.0; fixed in 1.28.11
- github.com/rancher/rke2 (Go): affected from 1.28.0; fixed in 1.28.11
- github.com/rancher/rke2 (Go): affected from 1.29.0; fixed in 1.29.6
- github.com/rancher/rke2 (Go): affected from 1.29.0; fixed in 1.29.6
- github.com/rancher/rke2 (Go): affected from 1.30.0; fixed in 1.30.2
- github.com/rancher/rke2 (Go): affected from 1.30.0; fixed in 1.30.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-x7xj-jvwp-97rv/ (Markdown: https://insights.sbomify.com/GHSA-x7xj-jvwp-97rv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x7xj-jvwp-97rv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x7xj-jvwp-97rv/
Summaries are generated and may contain mistakes; the official description above is the record.
