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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.1
- **CVSS:** 3.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.69% (percentile 48, 2026-11-26)
- **CWE:** CWE-193
- **Aliases:** GHSA-xm67-587q-r2vw, RUSTSEC-2023-0093
- **Published:** 2023-03-03T12:00:00.000Z
- **Modified:** 2026-10-12T18:00:06.812Z

## Who should check

- Projects that depend on crates.io package wasmtime (\>= 1.0.0, \< 4.0.1)
- Projects that depend on crates.io package cranelift-codegen (\>= 0.88.0, \< 0.91.1)
- Anyone running 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

## 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.

## Affected and fixed versions

- crates.io `wasmtime`: affected \>= 1.0.0, \< 4.0.1; fixed 4.0.1, 5.0.1, 6.0.1 (osv)
- crates.io `cranelift-codegen`: affected \>= 0.88.0, \< 0.91.1; fixed 0.91.1, 0.92.1, 0.93.1 (osv)
- 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 (cvelist)

## Mitigation

- Upgrade wasmtime to one of 4.0.1, 5.0.1, 6.0.1 (or later in the same release line).
- Upgrade cranelift-codegen to one of 0.91.1, 0.92.1, 0.93.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-27477. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-27477.md
Affected: wasmtime >= 1.0.0, < 4.0.1; cranelift-codegen >= 0.88.0, < 0.91.1
Fixed in: 4.0.1, 5.0.1, 6.0.1, 0.91.1, 0.92.1, 0.93.1

Steps:
1. Search this machine and project for wasmtime (crates.io), cranelift-codegen (crates.io), bytecodealliance wasmtime: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-27477 being exploited?

There is no confirmed exploitation: CVE-2023-27477 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-27477?

Low: CVSS 3.1 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-27477?

wasmtime \>= 1.0.0, \< 4.0.1; cranelift-codegen \>= 0.88.0, \< 0.91.1.

### Is there a fix for CVE-2023-27477?

Yes. Fixed in 4.0.1, 5.0.1, 6.0.1, 0.91.1, 0.92.1, 0.93.1. Upgrade wasmtime to one of 4.0.1, 5.0.1, 6.0.1 (or later in the same release line). Upgrade cranelift-codegen to one of 0.91.1, 0.92.1, 0.93.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2023-27477?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://groups.google.com/a/bytecodealliance.org/g/sec-announce/c/Mov-ItrNJsQ>
- vendor: <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-xm67-587q-r2vw>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-27477>
- vendor: <https://rustsec.org/advisories/RUSTSEC-2023-0093.html>
- patch: <https://github.com/bytecodealliance/wasmtime/commit/5dc2bbccbb363e474d2c9a1b8e38a89a43bbd5d1>
- other: <https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.wasm_simd>
- other: <https://github.com/webassembly/simd>
- other: <https://github.com/bytecodealliance/wasmtime>
- other: <https://crates.io/crates/wasmtime>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-27477>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-xm67-587q-r2vw> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/RUSTSEC-2023-0093> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-27477> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-27477>
