Heap Buffer Overflow in Creolabs Gravity Affects Script Evaluation Process
CVE-2026-40504

9.3CRITICAL

Key Information:

Status
Vendor
CVE Published:
16 April 2026

What is CVE-2026-40504?

Creolabs Gravity versions prior to 0.9.6 are susceptible to a heap buffer overflow vulnerability within the gravity_vm_exec function. This flaw allows attackers to manipulate memory by creating scripts with an excessive number of string literals at the global scope. The insufficient bounds checking in the gravity_fiber_reassign() function can lead to heap metadata corruption, paving the way for potential arbitrary code execution in applications that process untrusted scripts. Users are urged to update their Gravity installation to version 0.9.6 or later to mitigate this risk.

Affected Version(s)

gravity 0 < 0.9.6

gravity 0 < 18b9195598d9b944376754c6d1ad76e38a4adca1

References

CVSS V4

Score:
9.3
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

segv0x
.