# CVE-2023-27477: wasmtime vulnerable to miscompilation of `i8x16.select` with the same inputs on x86_64

- Severity: Low 3.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.62%, higher than 51% of CVEs (2026-12-01)
- Published: 2023-03-03T12:00:00.000Z
- Modified: 2026-10-12T18:00:06.812Z
- Also known as: GHSA-xm67-587q-r2vw, RUSTSEC-2023-0093
- Weaknesses: CWE-193
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

wasmtime is a fast and secure runtime for WebAssembly. Wasmtime's code generation backend, Cranelift, has a bug on x86_64 platforms for the WebAssembly `i8x16.select` instruction which will produce the wrong results when the same operand is provided to the instruction and some of the selected indices are greater than 16. There is an off-by-one error in the calculation of the mask to the `pshufb` instruction which causes incorrect results to be returned if lanes are selected from the second vector. This codegen bug has been fixed in Wasmtiem 6.0.1, 5.0.1, and 4.0.1. Users are recommended to upgrade to these updated versions. If upgrading is not an option for you at this time, you can avoid this miscompilation by disabling the Wasm simd proposal. Additionally the bug is only present on x86_64 hosts. Other platforms such as AArch64 and s390x are not affected.

(As written by CVE List.)

## Affected

- bytecodealliance wasmtime: cranelift-codegen: >= 0.88.0, < 0.91.1; cranelift-codegen: >= 0.92.0, < 0.92.1; cranelift-codegen: >= 0.93.0, < 0.93.1;  wasmtime: >= 0.37.0, < 4.0.1;  wasmtime: >= 5.0.0, < 5.0.1;  wasmtime: >= 6.0.0, < 6.0.1; from 0.37.0 before 4.0.1; 5.0.0; 6.0.0
- wasmtime (crates.io): from 1.0.0 before 4.0.1; from 5.0.0 before 5.0.1; from 6.0.0 before 6.0.1; from 0.0.0-0 before 4.0.1
- cranelift-codegen (crates.io): from 0.88.0 before 0.91.1; from 0.92.0 before 0.92.1; from 0.93.0 before 0.93.1
- bytecodealliance cranelift-codegen: from 0.84.0 before 0.91.1; 0.92.0; 0.93.0

## Every score

- GitHub_M: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- RustSec Advisory Database: CVSS:3.1 3.1 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.wasm_simd> (product, web)
- <https://github.com/webassembly/simd> (not-applicable, web)
- <https://groups.google.com/a/bytecodealliance.org/g/sec-announce/c/Mov-ItrNJsQ> (mailing-list, release-notes, vendor-advisory, web)
- <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-xm67-587q-r2vw> (mitigation, patch, vendor-advisory, web)
- <https://github.com/bytecodealliance/wasmtime/commit/5dc2bbccbb363e474d2c9a1b8e38a89a43bbd5d1> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-27477> (advisory)
- <https://github.com/bytecodealliance/wasmtime> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0093.html> (advisory, web)
- <https://crates.io/crates/wasmtime> (package)

## Sources

- CVE List: [CVE-2023-27477](https://www.cve.org/CVERecord?id=CVE-2023-27477), CVE Terms of Use, modified 2025-02-25
- GitHub Advisory Database: [GHSA-xm67-587q-r2vw](https://github.com/advisories/GHSA-xm67-587q-r2vw), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2023-0093](https://rustsec.org/advisories/RUSTSEC-2023-0093.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2023-27477](https://nvd.nist.gov/vuln/detail/CVE-2023-27477), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-27477 · Whole record: https://cve.day/CVE-2023-27477.json · Rebuilt by cve.day 2026-11-25T22:58:22.338Z
