CVE-2024-47813 in Bytecodealliance Wasmtime
Wasmtime is an open source runtime for WebAssembly. Under certain concurrent event orderings, a `wasmtime::Engine`'s internal type registry was susceptible to double-unregistration bugs due to a race condition, leading to panics and potentially type registry corruption. That registry corruption could, following an a...
Affects 1 product from 1 vendor. Facts below cite their sources.
Requires local access, high complexity, high privileges required, requires user interaction, impact contained to the vulnerable component, no confidentiality impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Bytecodealliance | Wasmtime | 19.0.0 19.0.1 19.0.2 20.0.0 20.0.1 20.0.2+9 more21.0.0 21.0.1 22.0.0 23.0.0 23.0.1 23.0.2 24.0.0 25.0.0 25.0.1 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
Wasmtime is an open source runtime for WebAssembly. Under certain concurrent event orderings, a `wasmtime::Engine`'s internal type registry was susceptible to double-unregistration bugs due to a race condition, leading to panics and potentially type registry corruption. That registry corruption could, following an additional and particular sequence of concurrent events, lead to violations of WebAssembly's control-flow integrity (CFI) and type safety. Users that do not use `wasmtime::Engine` across multiple threads are not affected. Users that only create new modules across threads over time are additionally not affected. Reproducing this bug requires creating and dropping multiple type instances (such as `wasmtime::FuncType` or `wasmtime::ArrayType`) concurrently on multiple threads, where all types are associated with the same `wasmtime::Engine`. **Wasm guests cannot trigger this bug.** See the "References" section below for a list of Wasmtime types-related APIs that are affected. Wasmtime maintains an internal registry of types within a `wasmtime::Engine` and an engine is shareable across threads. Types can be created and referenced through creation of a `wasmtime::Module`, creation of `wasmtime::FuncType`, or a number of other APIs where the host creates a function (see "References" below). Each of these cases interacts with an engine to deduplicate type information and manage type indices that are used to implement type checks in WebAssembly's `call_indirect` function, for example. This bug is a race condition in this management where the internal type registry could be corrupted to trigger an assert or contain invalid state. Wasmtime's internal representation of a type has individual types (e.g. one-per-host-function) maintain a registration count of how many time it's been used. Types additionally have state within an engine behind a read-write lock such as lookup/deduplication information. The race here is a time-of-check versus time-of-use (TOCTOU) bug where one thread atomically decrements a type entry's registration count, observes zero registrations, and then acquires a lock in order to unregister that entry. However, between when this first thread observed the zero-registration count and when it acquires that lock, another thread could perform the following sequence of events: re-register another copy of the type, which deduplicates to that same entry, resurrecting it and incrementing its registration count; then drop the type and decrement its registration count; observe that the registration count is now zero; acquire the type registry lock; and finally unregister the type. Now, when the original thread finally acquires the lock and unregisters the entry, it is the second time this entry has been unregistered. This bug was originally introduced in Wasmtime 19's development of the WebAssembly GC proposal. This bug affects users who are not using the GC proposal, however, and affects Wasmtime in its default configuration even when the GC proposal is disabled. Wasmtime users using 19.0.0 and after are all affected by this issue. We have released the following Wasmtime versions, all of which have a fix for this bug: * 21.0.2 * 22.0.1 * 23.0.3 * 24.0.1 * 25.0.2. If your application creates and drops Wasmtime types on multiple threads concurrently, there are no known workarounds. Users are encouraged to upgrade to a patched release.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-47813 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-215761-L |
| CVSS vector | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:L |
| Published | 2024-10-09 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-367: CWE-367
Related attack patterns (CAPEC)
CAPEC-27 Leveraging Race Conditions via Symbolic Links via CWE-367
CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions via CWE-367
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2024-47813 affects Wasmtime, an open source runtime for WebAssembly, due to a race condition that can lead to double-unregistration bugs in the internal type registry, causing panics and potential type registry corruption.
The vulnerability arises from specific concurrent event orderings that can cause a `wasmtime::Engine`'s internal type registry to be double-unregistered, leading to panics and potential corruption. This corruption could, under certain conditions, lead to further issues such as type confusion.
Questions
What is CVE-2024-47813?
CVE-2024-47813 affects Wasmtime, an open source runtime for WebAssembly, due to a race condition that can lead to double-unregistration bugs in the internal type registry, causing panics and potential type registry corruption.
What is the CVSS score for CVE-2024-47813?
CVE-2024-47813 has CVSS 2.9 (Low). Vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:L. EPSS: 0.2%.
Is CVE-2024-47813 actively exploited?
No confirmed active exploitation of CVE-2024-47813 as of 2026-09-25.
How do I remediate CVE-2024-47813?
Priority: MEDIUM.
What systems are affected by CVE-2024-47813?
CVE-2024-47813 affects Bytecodealliance Wasmtime.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Bytecodealliance","product":"Wasmtime","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.