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.

公開: 2025-10-07 最終更新: 2026-06-17 Assigner: [email protected] ソース: [email protected]

総合評価: CVE-2025-61670 は低リスク(6.6/100)。CVSS 深刻度は低。悪用される可能性が高い(EPSS 0.17%、7 パーセンタイル) 推奨対応: 総合リスクは低く緊急対応は不要です。通常の保守サイクルでパッチを適用し、CVSS / EPSS が上昇したら優先度を見直してください。

リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。

CVE-2025-61670 の EPSS(Exploit Prediction Scoring System)スコア

EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。

# 日付 旧 EPSS スコア 新 EPSS スコア Δ(新 − 旧)
1 2026-06-15 0.02% 0.17% +0.15%
2 2025-10-08 0.02%

EPSS の全履歴 (全 2 件)

CVE-2025-61670 の CVSS(Common Vulnerability Scoring System)指標

この CVE の CVSS 指標。

ベーススコア バージョン 深刻度 ベクトル 悪用しやすさ 影響 スコアの出典
1.0 4.0 LOW
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X クリックして展開
攻撃ベクター (AV:A)
同一ビル内 LAN など、隣接セグメントに立脚した前提。
攻撃の複雑さ (AC:L)
手順が短く、再現性が高い。
攻撃要件 (AT:P)
特定のミドルウェア状態やデータ配置など、追加前提が揃わないと成立しない。
必要な権限 (PR:L)
一般ユーザー権限で足り、管理者は不要。
ユーザーの関与 (UI:P)
リンクのクリック、インストール承認など、一度の人の判断が要る。
脆弱システムの機密性への影響 (VC:N)
脆弱な対象から機微情報が読まれうる余地はほとんどない。
脆弱システムの完全性への影響 (VI:N)
改ざん・なりすましで信頼が揺らぐ局面はほとんど想定されない。
脆弱システムの可用性への影響 (VA:L)
遅延や断続的障害、一部機能の停止など、運用で吸収しうる範囲。
後続システムの機密性への影響 (SC:N)
脆弱点を経由して下流の機微情報が読まれうる余地はほとんどない。
後続システムの完全性への影響 (SI:N)
下流の記録や設定が歪められる局面はほとんど想定されない。
後続システムの可用性への影響 (SA:L)
下流で遅延や部分停止が起きうるが、運用で緩和しやすい。
悪用の成熟度(Threat) (E:X)
Threat 情報が未指定のとき、最悪側(実害報告あり)に寄せて採点する。
機密性に対するセキュリティ要件(環境) (CR:X)
未指定のときは情報不足とみなし、スコア上は高要求(保守的)として扱う。
完全性に対するセキュリティ要件(環境) (IR:X)
未指定のときは情報不足とみなし、スコア上は高要求(保守的)として扱う。
可用性に対するセキュリティ要件(環境) (AR:X)
未指定のときは情報不足とみなし、スコア上は高要求(保守的)として扱う。
変更後の攻撃ベクター (MAV:X)
環境側で上書きしない限り、ベースの AV を採用。
変更後の攻撃の複雑さ (MAC:X)
環境側で上書きしない限り、ベースの AC を採用。
変更後の攻撃要件 (MAT:X)
環境側で上書きしない限り、ベースの AT を採用。
変更後の必要な権限 (MPR:X)
環境側で上書きしない限り、ベースの PR を採用。
変更後のユーザーの関与 (MUI:X)
環境側で上書きしない限り、ベースの UI を採用。
変更後の脆弱システムの機密性への影響 (MVC:X)
環境側で上書きしない限り、ベースの VC を採用。
変更後の脆弱システムの完全性への影響 (MVI:X)
環境側で上書きしない限り、ベースの VI を採用。
変更後の脆弱システムの可用性への影響 (MVA:X)
環境側で上書きしない限り、ベースの VA を採用。
変更後の後続システムの機密性への影響 (MSC:X)
環境側で上書きしない限り、ベースの SC を採用。
変更後の後続システムの完全性への影響 (MSI:X)
環境側で上書きしない限り、ベースの SI を採用。
変更後の後続システムの可用性への影響 (MSA:X)
環境側で上書きしない限り、ベースの SA を採用。
安全性(補足、スコア非変更) (S:X)
人的安全への追加評価を行わない。
自動化可否(補足、スコア非変更) (AU:X)
キルチェーン自動化の評価を行わない。
復旧(補足、スコア非変更) (R:X)
サービス復元パスの評価を行わない。
価値密度(補足、スコア非変更) (V:X)
一撃で握れる資産規模の評価を行わない。
対応工数(補足、スコア非変更) (RE:X)
修復コストの評価を行わない。
提供元の緊急度(補足、スコア非変更) (U:X)
ベンダー色分けの緊急度を付さない。
[email protected]
3.3 3.1 LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L クリックして展開
攻撃ベクター (AV:L)
対象ホスト上でコードを実行できること、または別ユーザーの誤操作・悪意ある操作が前提になる。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:N)
メールのリンクを開く、マクロを有効にするなど、被害者の協力がなくても成立しうる。
スコープ (S:U)
影響は脆弱コンポーネントと同一のセキュリティ権限・信頼境界の内側に収まる。
機密性への影響 (C:N)
機微情報の漏えいは想定しにくい。
完全性への影響 (I:N)
改ざん・なりすましによる信頼毀損は軽微か、想定されない。
可用性への影響 (A:L)
遅延や一部機能の停止、断続的な障害など、運用で吸収しうる範囲。
1.8 1.4 [email protected]

CVE-2025-61670 の弱点分類(列挙)

CVE-2025-61670 の GitHub Security Advisory

GHSA-vvp9-h8p2-xwfc · 深刻度: low · エコシステム: rust — Wasmtime: Memory leak in C API with `externref` and `anyref` types

CVE-2025-61670 の OS トラッカー

vendor priority summary link
debian unimportant CVE-2025-61670 unimportant priority: Debian including 1 source packages (rust-wasmtime), 3 status rows across 3 suites (forky, sid, trixie): resolved 3. https://security-tracker.debian.org/tracker/CVE-2025-61670

CVE-2025-61670 の影響を受けるソフトウェア/構成

ベンダー 製品 バージョン 生の CPE
bytecodealliance wasmtime 37.0.0 cpe:2.3:a:bytecodealliance:wasmtime:37.0.0:*:*:*:*:rust:*:*
bytecodealliance wasmtime 37.0.1 cpe:2.3:a:bytecodealliance:wasmtime:37.0.1:*:*:*:*:rust:*:*

CVE-2025-61670 の参考情報

cvelogic Threat Intelligence