CVE-2026-40504
Critical · CVSS 9.8Creolabs Gravity — Heap Buffer Overflow RCE
- CVSS
- 9.8
- nvd
- EPSS
- —
- KEV
- No
- Class
- oss containerizable
- CWE-122
Description
Creolabs Gravity before 0.9.6 contains a heap buffer overflow vulnerability in the gravity_vm_exec function that allows attackers to write out-of-bounds memory by crafting scripts with many string literals at global scope. Attackers can exploit insufficient bounds checking in gravity_fiber_reassign() to corrupt heap metadata and achieve arbitrary code execution in applications that evaluate untrusted scripts.
Search profile — drives PoC discovery
Symbols gravity_vm_execgravity_fiber_reassigngravity_vm_exec heap overflowstring literals global scope
Keywords CVE-2026-40504Gravity scripting language heap buffer overflowgravity_vm_exec out-of-bounds writegravity_fiber_reassign bounds checkmarcobambini gravity CVECreolabs Gravity 0.9.6 exploitgravity heap metadata corruptionCWE-122 Gravity arbitrary code executiongravity script untrusted evaluation RCE
Versions: < 0.9.6
References
Status: enriched · ingested 2026-07-15T00:00:20.000Z · profiled 2026-07-15T00:30:20.000Z