CVE-2026-40504: marcobambini gravity · Heap-based Buffer Overflow
Affects marcobambini gravitySource CVE Database V5
Not known to be exploited · CVSS 9.3 Critical : upgrade to 18b9195598d9b944376754c6d1ad76e38a4adca1 or 0.9.6 as a priority.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 50% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 18b9195598d9b944376754c6d1ad76e38a4adca1, 0.9.6
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 16 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade gravity to 18b9195598d9b944376754c6d1ad76e38a4adca1 or 0.9.6; marcobambini/gravity and gravity to 0.9.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| marcobambinigravity | Affected
| Fixed in
|
GitHubmarcobambini/gravitypkg:github/marcobambini/gravityOther threats | Affected
| Fixed in
|
GitHubgravitypkg:github/gravityOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
If you cannot patch yet, avoid evaluating untrusted Gravity scripts or restrict script inputs to trusted sources.
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.
References
- github.com/marcobambini/gravity/releases/tag/0.9.6 (opens in a new tab)
- github.com/marcobambini/gravity/issues/437 (opens in a new tab)
- github.com/marcobambini/gravity/commit/18b9195598d9b944376754c6d1ad76e38a4adca1 (opens in a new tab)
- vulncheck.com/advisories/creolabs-gravity-heap-buffer-overflow-via-gravity-vm-exec (opens in a new tab)