# CVE-2023-32187: K3s apiserver port is vulnerable to unauthenticated remote denial-of-service (DoS) attack via TLS SAN stuffing attack

> Attackers with network access to the K3s API server port can cause a denial of service by exhausting resources.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Sep 2023
- **Updated:** 25 Sep 2024
- **Also known as:** GHSA-m4hf-6vgr-75r2

## What is CVE-2023-32187?

CVE-2023-32187 is a high-severity denial of service vulnerability in SUSE k3s, published on 18 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An Allocation of Resources Without Limits or Throttling vulnerability in SUSE k3s allows attackers with access to K3s servers' apiserver/supervisor port (TCP 6443) cause denial of service.
This issue affects k3s: from v1.24.0 before v1.24.17+k3s1, from v1.25.0 before v1.25.13+k3s1, from v1.26.0 before v1.26.8+k3s1, from sev1.27.0 before v1.27.5+k3s1, from v1.28.0 before v1.28.1+k3s1.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2023-32187?

10 open source packages ship an affected version, including github.com/k3s-io/k3s. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/k3s-io/k3s` | Go | All versions | 1.24.17 |
| `github.com/k3s-io/k3s` | Go | All versions | 1.24.17 |
| `github.com/k3s-io/k3s` | Go | From 1.25.0 | 1.25.13 |
| `github.com/k3s-io/k3s` | Go | From 1.25.0 | 1.25.13 |
| `github.com/k3s-io/k3s` | Go | From 1.26.0 | 1.26.8 |
| `github.com/k3s-io/k3s` | Go | From 1.26.0 | 1.26.8 |
| `github.com/k3s-io/k3s` | Go | From 1.27.0 | 1.27.5 |
| `github.com/k3s-io/k3s` | Go | From 1.27.0 | 1.27.5 |
| `github.com/k3s-io/k3s` | Go | From 1.28.0 | 1.28.1 |
| `github.com/k3s-io/k3s` | Go | From 1.28.0 | 1.28.1 |

Products: K3s K3s.

## How do I fix CVE-2023-32187?

Upgrade github.com/k3s-io/k3s to a fixed version for your release line: 1.24.17, 1.25.13, 1.26.8 or 1.27.5.

## Is CVE-2023-32187 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-32187 and fix it if it is affected.

What it is: CVE-2023-32187 is a high-severity denial of service vulnerability in SUSE k3s, published on 18 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-32187 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/k3s-io/k3s (Go): affected all versions; fixed in 1.24.17
- github.com/k3s-io/k3s (Go): affected all versions; fixed in 1.24.17
- github.com/k3s-io/k3s (Go): affected from 1.25.0; fixed in 1.25.13
- github.com/k3s-io/k3s (Go): affected from 1.25.0; fixed in 1.25.13
- github.com/k3s-io/k3s (Go): affected from 1.26.0; fixed in 1.26.8
- github.com/k3s-io/k3s (Go): affected from 1.26.0; fixed in 1.26.8
- github.com/k3s-io/k3s (Go): affected from 1.27.0; fixed in 1.27.5
- github.com/k3s-io/k3s (Go): affected from 1.27.0; fixed in 1.27.5
- github.com/k3s-io/k3s (Go): affected from 1.28.0; fixed in 1.28.1
- github.com/k3s-io/k3s (Go): affected from 1.28.0; fixed in 1.28.1

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

## Sources

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

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