CVE-2023-41880
Miscompilation of wasm `i64x2.shr_s` instruction with constant input on x86_64
Check your servers for CVE-2023-41880
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-41880 affects wasmtime, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Wasmtime is a standalone runtime for WebAssembly. Wasmtime versions from 10.0.0 to versions 10.02, 11.0.2, and 12.0.1 contain a miscompilation of the WebAssembly `i64x2.shr_s` instruction on x86_64 platforms when the shift amount is a constant value that is larger than 32. Only x86_64 is affected so all other targets are not affected by this. The miscompilation results in the instruction producing an incorrect result, namely the low 32-bits of the second lane of the vector are derived from the low 32-bits of the second lane of the input vector instead of the high 32-bits. The primary impact of this issue is that any WebAssembly program using the `i64x2.shr_s` with a constant shift amount larger than 32 may produce an incorrect result.
This issue is not an escape from the WebAssembly sandbox. Execution of WebAssembly guest programs will still behave correctly with respect to memory sandboxing and isolation from the host. Wasmtime considers non-spec-compliant behavior as a security issue nonetheless.
This issue was discovered through fuzzing of Wasmtime's code generator Cranelift.
Wasmtime versions 10.0.2, 11.0.2, and 12.0.2 are all patched to no longer have this miscompilation. This issue only affects x86_64 hosts and the only workaround is to either scan for this pattern in wasm modules which is nontrivial or to disable the SIMD proposal for WebAssembly. Users prior to 10.0.0 are unaffected by this vulnerability.
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.81%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 53.6% of all scored CVEs. Scores of 29 Nov 2026.
The assessment of CISA (SSVC, 24 Sep 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-193 Off-by-one Error
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| wasmtime |
affected >= 10.0.0, < 10.0.2 affected >= 11.0.0, < 11.0.2 affected >= 12.0.0, < 12.0.2
|
Is my server affected?
Find the installed version of wasmtime and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i wasmtime
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-41880 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-41880RHEL, Rocky, Alma, Fedora
rpm -q wasmtime
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-41880Alpine
apk list --installed | grep -i wasmtimeWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-41880
trivy image --scanners vuln IMAGE | grep CVE-2023-41880
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-gw5p-q8mj-p7gh#:~:text=Mailing%20list%20announcement github.com
- https://github.com/bytecodealliance/wasmtime/pull/6372 github.com
- https://github.com/bytecodealliance/wasmtime/commit/8d7eda15b0badcbea83a7aac2d08f80788b59240 github.com
- https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.wasm_simd docs.rs
Source: the record CVE-2023-41880 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse