CVE-2021-32629
Python vulnerability analysis and mitigation

Overview

CVE-2021-32629 is a critical vulnerability discovered in Cranelift, an open-source code generator maintained by Bytecode Alliance. The vulnerability was introduced in the new backend on September 8, 2020, and first included in release 0.73.0. The bug affects the Cranelift x64 backend and could potentially result in a sandbox escape in a WebAssembly program (GitHub Advisory, Fastly Advisory).

Technical details

The vulnerability stems from a code generation flaw where the system 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 with another optimization where the instruction selector elides a 32-to-64-bit zero-extend operator. The issue occurs under specific circumstances: when an i32 value is greater than or equal to 0x8000_0000, the value is spilled and reloaded by the register allocator, and the value is produced by special instructions (add, sub, mul, and, or) that zero the upper 32 bits of the destination (GitHub Advisory).

Impact

If exploited, the vulnerability could allow access to memory addresses up to 2GiB before the start of the WebAssembly module heap. For heap bounds larger than 2GiB, it would be possible to read memory from a computable range dependent on the heap's bound size. This could potentially lead to sandbox escape and unauthorized memory access. The severity of the impact depends on the heap implementation, particularly if the heap has bounds checks and doesn't rely exclusively on guard pages (GitHub Advisory).

Mitigation and workarounds

Users of Cranelift version 0.73.0 should upgrade to either version 0.73.1 or 0.74.0 to remediate this vulnerability. Users of versions prior to 0.73.0 should update if they were not using the old default backend. For systems unable to upgrade immediately, the vulnerability's impact can be mitigated by ensuring there is no memory mapped in the accessible range, for example, by maintaining a 2 GiB guard region before the WebAssembly module heap (GitHub Advisory).

Community reactions

The vulnerability was discovered through collaborative efforts between industry and academia. It was identified by developers at Fastly following a report from Javier Cabrera Arteaga of KTH Royal Institute of Technology, with support from project Trustful of Stiftelsen för Strategisk Forskning. Fastly conducted a thorough investigation and confirmed that no WebAssembly modules in their Compute@Edge platform were crafted to exploit this bug (Fastly Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 11, 2025
CVE-2025-13780CRITICAL9.1
  • PythonPython
  • pgadmin4
NoYesDec 11, 2025
CVE-2025-67644HIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 11, 2025
CVE-2025-67720MEDIUM6.5
  • PythonPython
  • pyrofork
NoYesDec 11, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management