Buffer overflow in Marcobambini Gravity

CVE-2026-40504

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.

Vulnerability class: Buffer Overflow

Published · last modified .

CVSS v3 metric

CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.009 (57.5th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 57th percentile — 57.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2026-40504: held from 0.006 to 0.009.

EPSS over last 30 days · oldest: 0.006 · newest: 0.009 · change: +0.002

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-40504?
CVE-2026-40504 is a critical-severity vulnerability in Marcobambini Gravity, classified under Heap-based Buffer Overflow. CVSS score: 9.8/10. Published 2026-04-16.
How severe is CVE-2026-40504?
Critical severity. CVSS v3 base score is 9.8 out of 10.