CVE-2021-32629 Vulnerability Analysis & Exploit Details

CVE-2021-32629
Vulnerability Scoring

7.2
/10
Very High Risk

Highly exploitable, CVE-2021-32629 poses a critical security risk that could lead to severe breaches.

Attack Complexity Details

  • Attack Complexity: High
    Exploits require significant effort and special conditions.
  • Attack Vector: Local
    Vulnerability requires local system access.
  • Privileges Required: Low
    Some privileges are necessary to exploit the vulnerability.
  • Scope: Changed
    Successful exploitation can impact components beyond the vulnerable component.
  • User Interaction: Required
    User interaction is necessary for successful exploitation.

CVE-2021-32629 Details

Status: Modified

Last updated: 🕕 21 Nov 2024, 06:07 UTC
Originally published on: 🕓 24 May 2021, 16:15 UTC

Time between publication and last update: 1276 days

CVSS Release: version 3

CVSS3 Source

security-advisories@github.com

CVSS3 Type

Secondary

CVSS3 Vector

CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

CVE-2021-32629 Vulnerability Summary

CVE-2021-32629: Cranelift is an open-source code generator maintained by Bytecode Alliance. It translates a target-independent intermediate representation into executable machine code. There is a bug in 0.73 of the Cranelift x64 backend that can create a scenario that could result in a potential sandbox escape in a Wasm program. 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. The recently-released version 0.73 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 upto 2GiB before the start of the Wasm program heap. 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 heaps 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 Wasm program heap. The impact of the vulnerability is mitigated if there is no memory mapped in the range accessible using this bug, for example, if there is a 2 GiB guard region before the Wasm program heap. The bug in question performs a sign-extend instead of a zero-extend on a value loaded from the stack, when the register allocator reloads a spilled integer value narrower than 64 bits. This interacts poorly with another optimization: the instruction selector elides a 32-to-64-bit zero-extend operator when we know that an instruction producing a 32-bit value actually zeros the upper 32 bits of its destination register. Hence, we rely on these zeroed bits, but the type of the value is still i32, and the spill/reload reconstitutes those bits as the sign extension of the i32’s MSB. The issue would thus occur when: * An i32 value in a Wasm program is greater than or equal to 0x8000_0000; * The value is spilled and reloaded by the register allocator due to high register pressure in the program between the value’s definition and its use; * The value is produced by an instruction that we know to be “special” in that it zeroes the upper 32 bits of its destination: add, sub, mul, and, or; * The value is then zero-extended to 64 bits in the Wasm program; * The resulting 64-bit value is used. Under these circumstances there is a potential sandbox escape when the i32 value is a pointer. The usual code emitted for heap accesses zero-extends the Wasm heap address, adds it to a 64-bit heap base, and accesses the resulting address. If the zero-extend becomes a sign-extend, the program could reach backward and access memory up to 2GiB before the start of its heap. In addition to assessing the nature of the code generation bug in Cranelift, we have also determined that under specific circumstances, both Lucet and Wasmtime using this version of Cranelift may be exploitable. See referenced GitHub Advisory for more details.

Assessing the Risk of CVE-2021-32629

Access Complexity Graph

The exploitability of CVE-2021-32629 depends on two key factors: attack complexity (the level of effort required to execute an exploit) and privileges required (the access level an attacker needs).

Exploitability Analysis for CVE-2021-32629

This vulnerability, CVE-2021-32629, requires a high level of attack complexity and low privileges, making it difficult but not impossible to exploit. Organizations should ensure robust security configurations to mitigate risks.

Understanding AC and PR

A lower complexity and fewer privilege requirements make exploitation easier. Security teams should evaluate these aspects to determine the urgency of mitigation strategies, such as patch management and access control policies.

Attack Complexity (AC) measures the difficulty in executing an exploit. A high AC means that specific conditions must be met, making an attack more challenging, while a low AC means the vulnerability can be exploited with minimal effort.

Privileges Required (PR) determine the level of system access necessary for an attack. Vulnerabilities requiring no privileges are more accessible to attackers, whereas high privilege requirements limit exploitation to authorized users with elevated access.

CVSS Score Breakdown Chart

Above is the CVSS Sub-score Breakdown for CVE-2021-32629, illustrating how Base, Impact, and Exploitability factors combine to form the overall severity rating. A higher sub-score typically indicates a more severe or easier-to-exploit vulnerability.

CIA Impact Analysis

Below is the Impact Analysis for CVE-2021-32629, showing how Confidentiality, Integrity, and Availability might be affected if the vulnerability is exploited. Higher values usually signal greater potential damage.

  • Confidentiality: High
    Exploiting CVE-2021-32629 can result in unauthorized access to sensitive data, severely compromising data privacy.
  • Integrity: High
    CVE-2021-32629 could allow unauthorized modifications to data, potentially affecting system reliability and trust.
  • Availability: None
    CVE-2021-32629 does not impact system availability.

Exploit Prediction Scoring System (EPSS)

The EPSS score estimates the probability that this vulnerability will be exploited in the near future.

EPSS Score: 0.081% (probability of exploit)

EPSS Percentile: 37.56% (lower percentile = lower relative risk)
This vulnerability is less risky than approximately 62.44% of others.

CVE-2021-32629 References

External References

CWE Common Weakness Enumeration

CWE-681

Vulnerable Configurations

  • cpe:2.3:a:bytecodealliance:cranelift-codegen:-:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:-:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.14.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.14.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.15.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.15.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.16.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.16.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.16.1:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.16.1:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.17.0:-:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.17.0:-:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.17.0:alpha:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.17.0:alpha:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.18.1:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.18.1:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.19.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.19.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.20.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.20.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.21.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.21.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.21.1:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.21.1:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.22.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.22.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.23.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.23.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.24.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.24.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.25.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.25.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.26.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.26.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.27.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.27.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.28.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.28.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.29.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.29.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.30.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.30.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.31.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.31.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.32.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.32.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.33.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.33.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.34.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.34.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.35.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.35.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.36.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.36.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.37.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.37.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.38.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.38.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.39.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.39.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.40.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.40.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.41.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.41.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.42.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.42.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.43.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.43.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.43.1:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.43.1:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.44.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.44.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.45.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.45.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.46.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.46.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.46.1:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.46.1:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.47.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.47.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.48.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.48.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.49.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.49.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.50.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.50.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.51.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.51.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.52.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.52.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.53.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.53.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.54.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.54.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.55.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.55.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.56.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.56.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.58.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.58.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.59.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.59.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.60.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.60.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.61.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.61.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.62.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.62.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.63.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.63.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.64.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.64.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.65.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.65.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.66.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.66.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.67.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.67.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.68.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.68.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.69.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.69.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.70.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.70.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.71.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.71.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.72.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.72.0:*:*:*:*:rust:*:*
  • cpe:2.3:a:bytecodealliance:cranelift-codegen:0.73.0:*:*:*:*:rust:*:*
    cpe:2.3:a:bytecodealliance:cranelift-codegen:0.73.0:*:*:*:*:rust:*:*

Protect Your Infrastructure against CVE-2021-32629: Combat Critical CVE Threats

Stay updated with real-time CVE vulnerabilities and take action to secure your systems. Enhance your cybersecurity posture with the latest threat intelligence and mitigation techniques. Develop the skills necessary to defend against CVEs and secure critical infrastructures. Join the top cybersecurity professionals safeguarding today's infrastructures.

Other 5 Recently Published CVEs Vulnerabilities

  • CVE-2025-3809 – The Debug Log Manager plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the auto-refresh debug log in all versions up to, and i...
  • CVE-2025-2111 – The Insert Headers And Footers plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 3.1.1. This i...
  • CVE-2024-13926 – The WP-Syntax WordPress plugin through 1.2 does not properly handle input, allowing an attacker to create a post containing a large number of tags,...
  • CVE-2025-3103 – The CLEVER - HTML5 Radio Player With History - Shoutcast and Icecast - Elementor Widget Addon plugin for WordPress is vulnerable to arbitrary file ...
  • CVE-2025-3275 – The Themesflat Addons For Elementor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the TF E Slider widget in all versions up...