# CVE-2023-30612: Malicious HTTP requests could close arbitrary opening file descriptors in cloud-hypervisor

> Attackers with write access to the API socket can close arbitrary file descriptors, causing a crash or potential use-after-free in Cloud Hypervisor.

- **Severity:** Medium 4.0 (`CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Apr 2023
- **Updated:** 5 Feb 2025
- **Also known as:** AZL-26278, GHSA-g6mw-f26h-4jgp

## What is CVE-2023-30612?

CVE-2023-30612 is a medium-severity use after free vulnerability in cloud-hypervisor, published on 19 Apr 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Cloud hypervisor is a Virtual Machine Monitor for Cloud workloads. This vulnerability allows users to close arbitrary open file descriptors in the Cloud Hypervisor process via sending malicious HTTP request through the HTTP API socket. As a result, the Cloud Hypervisor process can be easily crashed, causing Deny-of-Service (DoS). This can also be a potential Use-After-Free (UAF) vulnerability. Users require to have the write access to the API socket file to trigger this vulnerability.  Impacted versions of Cloud Hypervisor include upstream main branch, v31.0, and v30.0. The vulnerability was initially detected by our `http_api_fuzzer` via oss-fuzz. This issue has been addressed in versions 30.1 and 31.1. Users unable to upgrade may mitigate this issue by ensuring the write access to the API socket file is granted to trusted users only.

Weakness: CWE-416 (Use After Free), CWE-306 (Missing Authentication for Critical Functionality)

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

It affects 1 product.


Products: Cloudhypervisor Cloud Hypervisor.

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

Upgrade to a fixed version.

## Is CVE-2023-30612 being exploited?

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

## Other vulnerabilities in cloud-hypervisor

- [CVE-2026-27211](https://insights.sbomify.com/CVE-2026-27211/): Cloud Hypervisor: Host File Exfiltration via QCOW Backing File Abuse (critical 9.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2023-30612 is a medium-severity use after free vulnerability in cloud-hypervisor, published on 19 Apr 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-30612 in the wild and no public exploit code.

Affected product: cloud-hypervisor. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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