Home / bytecodealliance / wasmtime / CVE-2025-61670
CVE-2025-61670: is it exploited, and which versions of bytecodealliance wasmtime are affected and fixed?
CVE-2025-61670 is a resource not released after use vulnerability in bytecodealliance wasmtime. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:09 UTC). Affected: wasmtime-c-api-impl from 37.0.0 before 37.0.2 and wasmtime-bin before 37.0.2 (GitHub advisory GHSA-vvp9-h8p2-xwfc). Fixed in 37.0.2 (GitHub advisory GHSA-vvp9-h8p2-xwfc). Severity: Low (1.0, CVSS 4.0, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:09 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:16 UTC.
What is CVE-2025-61670?
Wasmtime has memory leak in C API with `externref` and `anyref` types
Wasmtime is a runtime for WebAssembly. Wasmtime 37.0.0 and 37.0.1 have memory leaks in the C/C++ API when using bindings for the `anyref` or `externref` WebAssembly values. This is caused by a regression introduced during the development of 37.0.0 and all prior versions of Wasmtime are unaffected. If `anyref` or `externref` is not used in the C/C++ API then embeddings are also unaffected by the leaky behavior. The `wasmtime` Rust crate is unaffected by this leak. Development of Wasmtime 37.0.0 included a refactoring in Rust of changing the old `ManuallyRooted<T>` type to a new `OwnedRooted<T>` type. This change was integrated into Wasmtime's C API but left the C API in a state which had memory leaks. Additionally the new ownership semantics around this type were not reflected into the C++ API, making it leak-prone. A short version of the change is that previously `ManuallyRooted<T>`, as the name implies, required manual calls to an "unroot" operation. If this was forgotten then the memory was still cleaned up when the `wasmtime_store_t` itself was destroyed eventually. Documentation of when to "unroot" was sparse and there were already situations prior to 37.0.0 where memory would be leaked until the store was destroyed anyway. All memory, though, was always bound by the store, and destroying the store would guarantee that there were no memory leaks. In migrating to `OwnedRooted<T>` the usage of the type in Rust changed. A manual "unroot" operation is no longer required and it happens naturally as a destructor of the `OwnedRooted<T>` type in Rust itself. These new resource ownership semantics were not fully integrated into the preexisting semantics of the C/C++ APIs in Wasmtime. A crucial distinction of `OwnedRooted<T>` vs `ManuallyRooted<T>` is that the `OwnedRooted<T>` type allocates host memory outside of the store. This means that if an `OwnedRooted<T>` is leaked then destroying a store does not release this memory and it's a permanent memory leak on the host. This led to a few distinct, but related, issues arising: A typo in the `wasmtime_val_unroot` function in the C API meant that it did not actually unroot anything. This meant that even if embedders faithfully call the function then memory will be leaked. If a host-defined function returned a `wasmtime_{externref,anyref}_t` value then the value was never unrooted. The C/C++ API no longer has access to the value and the Rust implementation did not unroot. This meant that any values returned this way were never unrooted. The goal of the C++ API of Wasmtime is to encode automatic memory management in the type system, but the C++ API was not updated when `OwnedRooted<T>` was added. This meant that idiomatic usage of the C++ API would leak memory due to a lack of destructors on values. These issues have all been fixed in a 37.0.2 release of Wasmtime. The implementation of the C and C++ APIs have been updated accordingly and respectively to account for the changes of ownership here. For example `wasmtime_val_unroot` has been fixed to unroot, the Rust-side implementation of calling an embedder-defined function will unroot return values, and the C++ API now has destructors on the `ExternRef`, `AnyRef`, and `Val` types. These changes have been made to the 37.0.x release branch in a non-API-breaking fashion. Changes to the 38.0.0 release branch (and `main` in the Wasmtime repository) include minor API updates to better accommodate the API semantic changes. The only known workaround at this time is to avoid using `externref` and `anyref` in the C/C++ API of Wasmtime. If avoiding those types is not possible then it's required for users to update to mitigate the leak issue.
From the CVE record by GitHub_M, last updated October 7, 2025, 19:16 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| bytecodealliance | wasmtime | >= 37.0.0, < 37.0.2 |
As the CVE record by GitHub_M states it, last updated October 7, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| crates.io | wasmtime-c-api-impl | >= 37.0.0, < 37.0.2 | 37.0.2 | GHSA-vvp9-h8p2-xwfc |
| PyPI | wasmtime-bin | < 37.0.2 | 37.0.2 | GHSA-vvp9-h8p2-xwfc |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated July 14, 2026. Summary: Wasmtime: Memory leak in C API with `externref` and `anyref` types.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| bytecodealliance | wasmtime | 37.0.0 | application |
| bytecodealliance | wasmtime | 37.0.1 | application |
NVD analysis (status Analyzed), last modified June 17, 2026, 09:50 UTC.
How severe is CVE-2025-61670?
| Score | Version | Vector | Source |
|---|---|---|---|
| Low 1.0 | CVSS 4.0 | CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L | GitHub_M |
| Low 3.3 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-61670 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: partial (CISA ADP, October 7, 2025)
- EPSS
- 0.19% probability of exploitation activity in the next 30 days, percentile 9.7 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-772 Missing Release of Resource after Effective Lifetime
Where are the vendor advisories and references?
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-vvp9-h8p2-xwfc x_refsource_CONFIRM
- https://github.com/bytecodealliance/wasmtime/commit/adff9d9d0f09569203709d5687e5a7dc8e1ad0a3 x_refsource_MISC
- https://github.com/bytecodealliance/wasmtime/releases/tag/v37.0.2 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- September 29, 2025
- Published
- October 7, 2025, 18:49 UTC
- CVE record updated
- October 7, 2025, 19:16 UTC by GitHub_M
- NVD
- Analyzed, last modified June 17, 2026, 09:50 UTC
- Last checked
- CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:16 UTC; KEV December 3, 2026, 16:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect wasmtime?
- Dec 1, 2026CVE-2026-140414 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140415 bytecodealliance wasmtime: denial of service (uncontrolled resource consumption)
- Dec 1, 2026CVE-2026-140416 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140417 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140418 bytecodealliance wasmtime: reachable assertion (crash)
- Dec 1, 2026CVE-2026-140419 bytecodealliance wasmtime: out-of-bounds read
- Dec 1, 2026CVE-2026-140420 bytecodealliance wasmtime: denial of service (resources allocated without limits)
- Dec 1, 2026CVE-2026-140421 bytecodealliance wasmtime: improper Validation of Specified Type of Input
Questions about CVE-2025-61670
Is CVE-2025-61670 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:09 UTC. FIRST's EPSS gives it a 0.19% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of bytecodealliance wasmtime are affected by CVE-2025-61670?
wasmtime-c-api-impl from 37.0.0 before 37.0.2 and wasmtime-bin before 37.0.2, per the GitHub advisory GHSA-vvp9-h8p2-xwfc. The tables above give every range the sources list.
Which version fixes CVE-2025-61670?
37.0.2, per the GitHub advisory GHSA-vvp9-h8p2-xwfc. Check the vendor's advisory before you rely on it.
How severe is CVE-2025-61670?
Low (1.0, CVSS 4.0, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-61670?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.