# CVE-2024-30266: Wasmtime vulnerable to panic when using a dropped extenref-typed element segment

> A malicious WebAssembly module can cause the Wasmtime runtime to panic, leading to a denial of service for the host application.

- **Severity:** Low 3.3 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`)
- **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:** 4 Apr 2024
- **Updated:** 2 Aug 2024
- **Also known as:** DEBIAN-CVE-2024-30266, GHSA-75hq-h6g9-h4q5, PYSEC-2024-327, RUSTSEC-2024-0441, UBUNTU-CVE-2024-30266

## What is CVE-2024-30266?

CVE-2024-30266 is a low-severity denial of service vulnerability in bytecodealliance wasmtime, published on 4 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

wasmtime is a runtime for WebAssembly. The 19.0.0 release of Wasmtime contains a regression introduced during its development which can lead to a guest WebAssembly module causing a panic in the host runtime. A valid WebAssembly module, when executed at runtime, may cause this panic. This vulnerability has been patched in version 19.0.1.

Weakness: CWE-843 (Access of Resource Using Incompatible Type)

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

4 open source packages ship an affected version, including wasmtime. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wasmtime` | PyPI | All versions to 19.0.0 | None |
| `wasmtime` | crates.io | From 19.0.0 | 19.0.1 |
| `wasmtime` | crates.io | From 19.0.0 | 19.0.1 |
| `wasmtime` | crates.io | From 19.0.0 | 19.0.1 |

Products: Bytecodealliance Wasmtime.

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

Upgrade wasmtime to 19.0.1 or later.

## Is CVE-2024-30266 being exploited?

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

## Other vulnerabilities in bytecodealliance wasmtime

- [CVE-2026-34971](https://insights.sbomify.com/CVE-2026-34971/): Wasmtime miscompiled guest heap access enables sandbox escape on aarch64 Cranelift (critical 9.0)
- [CVE-2026-34987](https://insights.sbomify.com/CVE-2026-34987/): Wasmtime with Winch compiler backend on aarch64 may allow a sandbox-escaping memory access (critical 9.0)
- [CVE-2022-39393](https://insights.sbomify.com/CVE-2022-39393/): Wasmtime vulnerable to data leakage between instances in the pooling allocator (high 8.6)
- [CVE-2022-24791](https://insights.sbomify.com/CVE-2022-24791/): Use after free in Wasmtime (high 8.1)
- [CVE-2026-47261](https://insights.sbomify.com/CVE-2026-47261/): Wasmtime: WASI path_open(TRUNCATE) bypasses `FilePerms::WRITE` host restriction (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-30266 is a low-severity denial of service vulnerability in bytecodealliance wasmtime, published on 4 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-30266 in the wild and no public exploit code.

Affected packages and fixed versions:
- wasmtime (PyPI): affected all versions up to 19.0.0; no fix listed
- wasmtime (crates.io): affected from 19.0.0; fixed in 19.0.1
- wasmtime (crates.io): affected from 19.0.0; fixed in 19.0.1
- wasmtime (crates.io): affected from 19.0.0; fixed in 19.0.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-2024-30266/ (Markdown: https://insights.sbomify.com/CVE-2024-30266/index.md)
```

## Sources

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

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