# CVE-2023-42813: Denial of service from malicious manifest in kyverno

> An attacker controlling a registry can cause Kyverno denial of service via malicious manifest responses, affecting only source-built instances.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Nov 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-wc3x-5rfv-hh5v, GO-2023-2335

## What is CVE-2023-42813?

CVE-2023-42813 is a medium-severity denial of service vulnerability in kyverno, published on 13 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Kyverno is a policy engine designed for Kubernetes. A security vulnerability was found in Kyverno where an attacker could cause denial of service of Kyverno. The vulnerable component in Kyvernos Notary verifier. An attacker would need control over the registry from which Kyverno would fetch attestations. With such a position, the attacker could return a malicious response to Kyverno, when Kyverno would send a request to the registry. The malicious response would cause denial of service of Kyverno, such that other users' admission requests would be blocked from being processed. This is a vulnerability in a new component released in v1.11.0. The only users affected by this are those that have been building Kyverno from source at the main branch which is not encouraged. Users consuming official Kyverno releases are not affected. There are no known cases of this vulnerability being exploited in the wild.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

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

1 open source package ship an affected version, including github.com/kyverno/kyverno. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/kyverno/kyverno` | Go | From 1.5.0-rc1.0.20230601080528-80d139bb5d1d | 1.5.0-rc1.0.20230918070231-fec2992e3f9f |

Products: Nirmata Kyverno.

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

Upgrade github.com/kyverno/kyverno to 1.5.0-rc1.0.20230918070231-fec2992e3f9f or later.

## Is CVE-2023-42813 being exploited?

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

## Other vulnerabilities in kyverno

- [CVE-2024-48921](https://insights.sbomify.com/CVE-2024-48921/): Kyverno's PolicyException objects can be created in any namespace by default (high 8.7)
- [CVE-2023-34091](https://insights.sbomify.com/CVE-2023-34091/): Kyverno resource with a deletionTimestamp may allow policy circumvention (medium 6.5)
- [CVE-2023-42816](https://insights.sbomify.com/CVE-2023-42816/): Denial of service from malicious signature in kyverno (medium 6.1)
- [CVE-2023-33191](https://insights.sbomify.com/CVE-2023-33191/): kyverno seccomp control can be circumvented (medium 4.6)
- [CVE-2023-42814](https://insights.sbomify.com/CVE-2023-42814/): Denial of service from malicious image manifest in kyverno (low 3.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2023-42813 is a medium-severity denial of service vulnerability in kyverno, published on 13 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-42813 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/kyverno/kyverno (Go): affected from 1.5.0-rc1.0.20230601080528-80d139bb5d1d; fixed in 1.5.0-rc1.0.20230918070231-fec2992e3f9f

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

## Sources

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

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