Mittel

Wrong type for `Linker`-define functions when used across two `Engine`s

  • Veröffentlicht: 17.09.2021
  • Aktualisiert: 11.10.2026 13:19

Impact

As a Rust library the wasmtime crate clearly marks which functions are safe and which are unsafe, guaranteeing that if consumers never use unsafe then it should not be possible to have memory unsafety issues in their embeddings of Wasmtime. An issue was discovered in the safe API of Linker::func_* APIs. These APIs were previously not sound when one Engine was used to create the Linker and then a different Engine was used to create a Store and then the Linker was used to instantiate a module into that Store. Cross-Engine usage of functions is not supported in Wasmtime and this can result in type confusion of function pointers, resulting in being able to safely call a function with the wrong type.

Triggering this bug requires using at least two Engine values in an embedding and then additionally using two different values with a Linker (one at the creation time of the Linker and another when instantiating a module with the Linker).

It's expected that usage of more-than-one Engine in an embedding is relatively rare since an Engine is intended to be a globally shared resource, so the expectation is that the impact of this issue is relatively small.

The fix implemented is to change this behavior to panic!() in Rust instead of silently allowing it. Using different Engine instances with a Linker is a programmer bug that wasmtime catches at runtime.

Patches

This bug has been patched and users should upgrade to Wasmtime version 0.30.0.

Workarounds

If you cannot upgrade Wasmtime and are using more than one Engine in your embedding it's recommended to instead use only one Engine for the entire program if possible. An Engine is designed to be a globally shared resource that is suitable to have only one for the lifetime of an entire process. If using multiple Engines is required then code should be audited to ensure that Linker is only used with one Engine.

For more information

If you have any questions or comments about this advisory:

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) wasmtime < 0.30.0 0.30.0

Verweise

CVSS-Wert 6.3/10
CVSS-Vektor
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Schwäche (CWE)
CWE-125, CWE-590, CWE-787, CWE-416, CWE-843
Plattform
Python (PyPI)
Paket
wasmtime
Veröffentlicht
17.09.2021
Aktualisiert
11.10.2026 13:19

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2021-320 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-321 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-322 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-4873-36h9-wv49 - CC BY 4.0

OSV / GitHub Advisory Database - GHSA-v4cp-h94r-m7xf - CC BY 4.0

OSV / GitHub Advisory Database - GHSA-q879-9g95-56mx - CC BY 4.0

Schwachstellenhistorie: wasmtime

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
5
Erste → letzte
05.2021 04.2026
Ohne Fix
3
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 1
  • Mittel 3
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2021: 2
  2. 2022: 0
  3. 2023: 0
  4. 2024: 2
  5. 2025: 0
  6. 2026: 1
  1. Niedrig · 2.9 CVE-2024-47813 <= 19.0.0, <= 19.0.1, <= 19.0.2, <= 20.0.0, <= 20.0.1, <= 20.0.2, <= 21.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 keine Korrektur
  2. Wrong type for `Linker`-define functions when used across two `Engine`s dieser Eintrag
    Mittel · 6.3 CVE-2021-39216 < 0.30.0 0.30.0
  3. Hoch · 7.2 CVE-2021-32629 < 0.27.0 0.27.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.