# CVE-2026-27195: Wasmtime is vulnerable to panic when dropping a `[Typed]Func::call_async` future

> An attacker can cause a panic in Wasmtime by dropping an async function future prematurely, leading to a denial of service in host applications.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 24 Feb 2026
- **Updated:** 24 Feb 2026
- **Also known as:** GHSA-xjhv-v822-pf94, JLSEC-2026-1351, RUSTSEC-2026-0022

## What is CVE-2026-27195?

CVE-2026-27195 is a medium-severity denial of service vulnerability in bytecodealliance wasmtime, published on 24 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Wasmtime is a runtime for WebAssembly. Starting with Wasmtime 39.0.0, the `component-model-async` feature became the default, which brought with it a new implementation of `[Typed]Func::call_async` which made it capable of calling async-typed guest export functions.  However, that implementation had a bug leading to a panic under certain circumstances: First, the host embedding calls `[Typed]Func::call_async` on a function exported by a component, polling the returned `Future` once. Second, the component function yields control to the async runtime (e.g. Tokio), e.g. due to a call to host function registered using `LinkerInstance::func_wrap_async` which yields, or due an epoch interruption. Third, the host embedding drops the `Future` after polling it once.  This leaves the component instance in a non-reenterable state since the call never had a chance to complete. Fourth, the host embedding calls `[Typed]Func::call_async` again, polling the returned `Future`.  Since the component instance cannot be entered at this point, the call traps, but not before allocating a task and thread for the call. Fifth, the host embedding ignores the trap and drops the `Future`.  This panics due to the runtime attempting to dispose of the task created above, which panics since the thread has not yet exited. When a host embedder using the affected versions of Wasmtime calls `wasmtime::component::[Typed]Func::call_async` on a guest export and then drops the returned future without waiting for it to resolve, and then does so again with the same component instance, Wasmtime will panic. Embeddings that have the `component-model-async` compile-time feature disabled are unaffected. Wasmtime 40.0.4 and 41.0.4 have been patched to fix this issue. Versions 42.0.0 and later are not affected. If an embedding is not actually using any component-model-async features then disabling the `component-model-async` Cargo feature can work around this issue. This issue can also be worked around by either ensuring every `call_async` future is awaited until it completes or refraining from using the `Store` again after dropping a not-yet-resolved `call_async` future.

Weakness: CWE-755 (Improper Handling of Exceptional Conditions)

## Which versions are affected by CVE-2026-27195?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wasmtime` | crates.io | From 39.0.0 | 40.0.4, 41.0.4 |
| `wasmtime` | crates.io | From 39.0.0 | 40.0.4 |
| `wasmtime` | crates.io | From 39.0.0 | 40.0.4 |
| `wasmtime` | crates.io | From 41.0.0 | 41.0.4 |
| `wasmtime` | crates.io | From 41.0.0 | 41.0.4 |

Products: Bytecodealliance Wasmtime.

## How do I fix CVE-2026-27195?

Upgrade wasmtime to a fixed version for your release line: 40.0.4 or 41.0.4.

## Is CVE-2026-27195 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27195 exists.

## 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-2026-27195 and fix it if it is affected.

What it is: CVE-2026-27195 is a medium-severity denial of service vulnerability in bytecodealliance wasmtime, published on 24 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27195 exists.

Affected packages and fixed versions:
- wasmtime (crates.io): affected from 39.0.0; fixed in 40.0.4, 41.0.4
- wasmtime (crates.io): affected from 39.0.0; fixed in 40.0.4
- wasmtime (crates.io): affected from 39.0.0; fixed in 40.0.4
- wasmtime (crates.io): affected from 41.0.0; fixed in 41.0.4
- wasmtime (crates.io): affected from 41.0.0; fixed in 41.0.4

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

## Sources

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

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