CVE-2024-30266: Wasmtime vulnerable to panic when using a dropped extenref-typed element segment

Published Apr 2, 2024
·
Updated

Impact

The 19.0.0 release of Wasmtime contains a regression introduced during its development which can lead to a guest WebAssembly module causing a panic in the host runtime. A valid WebAssembly module, when executed at runtime, may cause this panic. The panic in question is caused when a WebAssembly module issues a table. instruction which uses a dropped element segment with a table that also has an externref type. This causes Wasmtime to erroneously use an empty function segment instead of an empty externref segment to perform this operation. This mismatch in types causes a panic in Wasmtime when it's asserted that an externref table is only viewed as externrefs.

This regression was introduced during the development of the 19.0.0 release and only affects the 19.0.0 release. This panic requires the reference-types WebAssembly feature to be enabled, and it is enabled by default. Toolchains are not known to generate this pattern by default so it's likely a module would need to be specifically crafted to trigger this panic.

A panic in a host runtime represents a possible denial-of-service in some scenarios. This panic cannot introduce memory unsafety or allow WebAssembly to break outside of its sandbox, however. There is no possible heap corruption or memory unsafety from this panic.

Patches

Wasmtime 19.0.1 has been released to fix this problem. Users of 19.0.0 should upgrade to 19.0.1. All other versions of Wasmtime are not affected by this issue.

Workarounds

If upgrading is not possible it's recommended to use config.referencetypes(false). That will disable these modules at validation-time which prevents the possibility of a panic at runtime. If reference-types are required, however, then there is no other workaround at this time other than upgrading.

References

Original bug report PR to fix the bug PR that introduced the bug

Other sources

wasmtime is a runtime for WebAssembly. The 19.0.0 release of Wasmtime contains a regression introduced during its development which can lead to a guest WebAssembly module causing a panic in the host runtime. A valid WebAssembly module, when executed at runtime, may cause this panic. This vulnerability has been patched in version 19.0.1.

— NVD

Affected Software

6 affected componentsFixes available
rust/wasmtime=19.0.0
19.0.1
bytecodealliance Wasmtime Rust=19.0.0
debian/rust-wasmtime<21.0.2+dfsg-1
21.0.2+dfsg-1
debian/rust-wasmtime<21.0.2+dfsg-1
21.0.2+dfsg-1
debian/rust-wasmtime
26.0.1+dfsg-336.0.20+dfsg-1
ubuntu/rust-wasmtime*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/wasmtime to a version that resolves this vulnerability.

    Fixed in 19.0.1
  2. Upgrade

    Upgrade debian/rust-wasmtime to a version that resolves this vulnerability.

    Fixed in 21.0.2+dfsg-1
  3. Upgrade

    Upgrade debian/rust-wasmtime to a version that resolves this vulnerability.

    Fixed in 26.0.1+dfsg-3Fixed in 36.0.20+dfsg-1
  4. Upgrade

    Upgrade Wasmtime to a version that resolves this vulnerability.

    Fixed in 19.0.1
  5. Configuration

    If upgrading is not possible and reference-types are not required, set config.reference_types(false) to disable these modules at validation time.

    Wasmtime config.reference_types = false

Event History

Apr 2, 2024
Advisory Published
via GitHub·09:09 PM
Apr 4, 2024
CVE Published
via MITRE·03:42 PM
Data Sourced
via MITRE·03:42 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 4, 2026
Withdrawn
via OSV·04:55 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-30266?

CVE-2024-30266 is considered a medium severity vulnerability due to its potential to cause runtime panics.

2

How do I fix CVE-2024-30266?

To fix CVE-2024-30266, update Wasmtime to version 19.0.1 or later.

3

Which versions of Wasmtime are affected by CVE-2024-30266?

Wasmtime version 19.0.0 is the only affected version for CVE-2024-30266.

4

What type of issue does CVE-2024-30266 represent?

CVE-2024-30266 represents a regression vulnerability that can lead to panics in the host runtime when executing certain WebAssembly modules.

5

What products are impacted by CVE-2024-30266?

The only impacted product identified by CVE-2024-30266 is Wasmtime version 19.0.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203