# CVE-2024-33522: Privilege escalation in Calico CNI install binary

> Local attackers on Kubernetes nodes can escalate privileges to root by exploiting an insecure SUID bit in the Calico CNI install binary.

- **Severity:** Medium 6.7 (`CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Apr 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-6362-gv4m-53ww, GO-2024-2801, MINI-5h63-q9vf-vwq7, MINI-5vjf-3cw2-4hch, MINI-fvqp-pfrg-5m58, MINI-j6fj-66xq-xq6m

## What is CVE-2024-33522?

CVE-2024-33522 is a medium-severity vulnerability in Tigera Calico, published on 29 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In vulnerable versions of Calico (v3.27.2 and below), Calico Enterprise (v3.19.0-1, v3.18.1, v3.17.3 and below), and Calico Cloud (v19.2.0 and below), an attacker who has local access to the Kubernetes node, can escalate their privileges by exploiting a vulnerability in the Calico CNI install binary. The issue arises from an incorrect SUID (Set User ID) bit configuration in the binary, combined with the ability to control the input binary, allowing an attacker to execute an arbitrary binary with elevated privileges.

Weakness: CWE-269 (Improper Privilege Management)

## Which versions are affected by CVE-2024-33522?

6 open source packages ship an affected version, including github.com/projectcalico/calico and github.com/projectcalico/calico/v3.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/projectcalico/calico` | Go | All versions | None |
| `github.com/projectcalico/calico` | Go | All versions | 3.26.5 |
| `github.com/projectcalico/calico` | Go | All versions | 3.26.5 |
| `github.com/projectcalico/calico` | Go | From 3.27.0 | 3.27.3 |
| `github.com/projectcalico/calico` | Go | From 3.27.0 | 3.27.3 |
| `github.com/projectcalico/calico/v3` | Go | All versions | None |

## How do I fix CVE-2024-33522?

Upgrade github.com/projectcalico/calico to a fixed version for your release line: 3.26.5 or 3.27.3.

## Is CVE-2024-33522 being exploited?

There is no known exploitation of CVE-2024-33522 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-33522 and fix it if it is affected.

What it is: CVE-2024-33522 is a medium-severity vulnerability in Tigera Calico, published on 29 Apr 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 CVE-2024-33522 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/projectcalico/calico (Go): affected all versions; no fix listed
- github.com/projectcalico/calico (Go): affected all versions; fixed in 3.26.5
- github.com/projectcalico/calico (Go): affected all versions; fixed in 3.26.5
- github.com/projectcalico/calico (Go): affected from 3.27.0; fixed in 3.27.3
- github.com/projectcalico/calico (Go): affected from 3.27.0; fixed in 3.27.3
- github.com/projectcalico/calico/v3 (Go): affected all versions; no fix listed

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/CVE-2024-33522/ (Markdown: https://insights.sbomify.com/CVE-2024-33522/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-33522
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-33522
- OSV: https://osv.dev/vulnerability/CVE-2024-33522

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-33522/
Summaries are generated and may contain mistakes; the official description above is the record.
