Categories
CVE-2021-32629

Out-of-Bounds Read in cranelift-codegen (CVE-2021-32629)

Summary

Vulnerability in cranelift-codegen (CVE-2021-32629). Confidential information can be exposed externally. Exploitable via memory_reservation_size. Mitigation: upgrade to 0.73.1 or later.

Original description

The description as published by the source.

There is a bug in 0.73.0 of the Cranelift x64 backend that can create a scenario that could result in a potential sandbox escape in a WebAssembly module. Users of versions 0.73.0 of Cranelift should upgrade to either 0.73.1 or 0.74 to remediate this vulnerability. Users of Cranelift prior to 0.73.0 should update to 0.73.1 or 0.74 if they were not using the old default backend.

Description

This bug was introduced in the new backend on 2020-09-08 and first included in a release on 2020-09-30, but the new backend was not the default prior to 0.73.0. The recently-released version 0.73.0 with default settings, and prior versions with an explicit build flag to select the new backend, are vulnerable. The bug in question performs a sign-extend instead of a zero-extend on a value loaded from the stack, under a specific set of circumstances. If those circumstances occur, the bug could allow access to memory addresses up to 2GiB before the start of the heap allocated for the WebAssembly module.

If the heap bound is larger than 2GiB, then it would be possible to read memory from a computable range dependent on the size of the heap's bound.

The impact of this bug is highly dependent on heap implementation; specifically:

  • if the heap has bounds checks, and
  • does not rely exclusively on guard pages, and
  • the heap bound is 2GiB or smaller

then this bug cannot be used to reach memory from another WebAssembly module heap.

The impact of the vulnerability is mitigated if the…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-32629 has been found in cranelift-codegen.
Attackers can target a specific entry point like memory_reservation_size over the network to misuse the product.
Confidential information can be exposed externally.
What to do: upgrade cranelift-codegen to 0.73.1 or later.
If unsure, ask your IT team or search "cranelift-codegen CVE-2021-32629" on the vendor's site.

CVE-2021-32629 (cranelift-codegen) — CWE-125
Attack vector: local
Attack surface: memory_reservation_size
Patched: 0.73.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Out-of-bounds read (CWE-125) exists in cranelift-codegen. Attackers reach the vulnerable code path via memory_reservation_size.

📍 Affected scope

Check the vendor advisory for the affected versions of cranelift-codegen. Attack surface: memory_reservation_size.

🔥 Severity

Severity: ?. Confidential information can be exposed externally.

🔧 How to fix

Update to 0.73.1.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'cranelift-codegen' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'cranelift-codegen' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で cranelift-codegen を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade cranelift-codegen to 0.73.1

    ステージング環境で 0.73.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

crates.io cranelift-codegen
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.73.1"}]}]
PyPI wasmtime
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.27.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details