CVE-2026-40504
Creolabs · Gravity
Creolabs Gravity before 0.9.6 is vulnerable to a heap buffer overflow in the VM execution engine, allowing arbitrary code execution.
Executive summary
A critical heap buffer overflow in the Creolabs Gravity VM allows attackers to achieve arbitrary code execution through crafted scripts.
Vulnerability
Insufficient bounds checking in the 'gravity_fiber_reassign()' function and the 'gravity_vm_exec' function leads to heap memory corruption. Attackers can exploit this by providing crafted scripts to execute arbitrary code on the host system.
Business impact
The CVSS score of 9.8 signifies a severe risk. If an application uses the Gravity engine to process untrusted scripts, an attacker could achieve complete system compromise, bypassing existing security boundaries.
Remediation
Immediate Action: Upgrade to Creolabs Gravity version 0.9.6 or later.
Proactive Monitoring: Monitor applications utilizing the Gravity engine for anomalous crashes or unexpected script processing behavior.
Compensating Controls: If upgrading is not possible, implement strict sandboxing or restrict the types of scripts allowed for execution by the VM.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
Memory corruption vulnerabilities in execution engines are high-priority. Organizations should update their dependencies to version 0.9.6 immediately to eliminate the risk of arbitrary code execution.