CVE-2026-24002 Overview
CVE-2026-24002 is a critical sandbox escape vulnerability affecting Grist, an open-source spreadsheet software that uses Python as its formula language. The vulnerability exists in the pyodide-based sandbox implementation when running on Node.js, which fails to provide an effective security barrier. Attackers who can trick users into opening a malicious Grist document can execute arbitrary processes on the server hosting Grist.
Critical Impact
Remote attackers can achieve arbitrary process execution on the server by crafting malicious spreadsheet documents when the GRIST_SANDBOX_FLAVOR environment variable is set to pyodide.
Affected Products
- Grist versions prior to 1.7.9
- Self-hosted Grist instances with GRIST_SANDBOX_FLAVOR set to pyodide
- Grist deployments using pyodide on Node.js for formula sandboxing
Discovery Timeline
- January 22, 2026 - CVE CVE-2026-24002 published to NVD
- January 22, 2026 - Last updated in NVD database
Technical Details for CVE-2026-24002
Vulnerability Analysis
This vulnerability is classified under CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), commonly referred to as an injection vulnerability. The core issue stems from the pyodide runtime on Node.js lacking adequate sandboxing capabilities that would normally isolate formula execution from the underlying server environment.
Grist provides spreadsheet functionality where formulas are written in Python and executed server-side. To protect against malicious formulas in untrusted documents, Grist offers multiple sandboxing mechanisms. However, when users configure GRIST_SANDBOX_FLAVOR=pyodide, the sandbox barrier is ineffective because pyodide running on Node.js does not provide the necessary isolation guarantees.
An attacker can craft a malicious Grist document containing specially constructed Python formulas. When this document is opened by a user on a vulnerable Grist instance, these formulas escape the intended sandbox and execute arbitrary processes directly on the host server with the same privileges as the Grist process.
Root Cause
The root cause is the fundamental architectural limitation of pyodide when running under Node.js. Unlike browser-based WebAssembly environments where pyodide benefits from browser sandboxing, the Node.js environment does not provide equivalent isolation. This means Python code executed through pyodide on Node.js has access to system resources and can spawn processes, effectively bypassing the intended formula sandbox.
Attack Vector
The attack requires a network-accessible Grist instance configured with the vulnerable pyodide sandbox flavor. The attacker does not need authentication to exploit this vulnerability—they only need to convince a user to open a malicious document. The attack works through the following chain:
- Attacker creates a malicious Grist document containing weaponized Python formulas
- Attacker distributes the document through social engineering or other means
- A user opens the document on a Grist instance with GRIST_SANDBOX_FLAVOR=pyodide
- The malicious formula executes, escaping the sandbox and running arbitrary processes on the server
The exploitation mechanism leverages the ability of Python code within pyodide on Node.js to access Node.js APIs or system calls that should normally be restricted in a sandboxed environment. For technical details on the vulnerability, see the GitHub Security Advisory.
Detection Methods for CVE-2026-24002
Indicators of Compromise
- Unexpected child processes spawned by the Grist server process
- Unusual network connections originating from the Grist server
- Suspicious Python formula content in Grist documents containing system command references
- Log entries indicating formula execution errors related to system access attempts
Detection Strategies
- Monitor the GRIST_SANDBOX_FLAVOR environment variable in all Grist deployments to identify instances using the vulnerable pyodide configuration
- Implement process monitoring to detect child process creation from the Grist application
- Review access logs for unusual document upload or opening activity
- Deploy endpoint detection and response (EDR) solutions like SentinelOne to detect sandbox escape attempts
Monitoring Recommendations
- Enable detailed logging for Grist formula execution events
- Configure alerts for any process spawning activity from the Grist server process
- Monitor for lateral movement attempts originating from Grist server infrastructure
- Implement file integrity monitoring on the Grist server to detect unauthorized modifications
How to Mitigate CVE-2026-24002
Immediate Actions Required
- Upgrade Grist to version 1.7.9 or later immediately
- If immediate upgrade is not possible, change GRIST_SANDBOX_FLAVOR from pyodide to gvisor as a workaround
- Audit all Grist instances in your environment to identify vulnerable configurations
- Review recent document activity for signs of exploitation
Patch Information
The Grist development team has addressed this vulnerability in version 1.7.9 and later by running pyodide under Deno instead of Node.js. Deno provides better security sandboxing capabilities, effectively closing the sandbox escape vector. Organizations should upgrade to version 1.7.9 or later as soon as possible.
For more information on sandboxing options, refer to the Grist Support Documentation.
Workarounds
- Set GRIST_SANDBOX_FLAVOR to gvisor instead of pyodide for stronger sandbox isolation
- Restrict access to Grist instances to trusted users only until patching is complete
- Implement network segmentation to limit the impact of potential server compromise
- Consider blocking document uploads from untrusted sources until the upgrade is deployed
# Configuration example - Switch to gvisor sandbox
export GRIST_SANDBOX_FLAVOR=gvisor
# Verify the sandbox configuration
env | grep GRIST_SANDBOX_FLAVOR
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


