{"id":"CVE-2026-40504","summary":"Creolabs Gravity \u003c 0.9.6 Heap Buffer Overflow via gravity_vm_exec","details":"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.","modified":"2026-07-16T03:31:06.738961549Z","published":"2026-04-16T01:10:27.364Z","database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-122"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40504.json","unresolved_ranges":[{"source":"AFFECTED_FIELD","extracted_events":[{"fixed":"18b9195598d9b944376754c6d1ad76e38a4adca1"}]}]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40504.json"},{"type":"ADVISORY","url":"https://github.com/marcobambini/gravity/releases/tag/0.9.6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40504"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/creolabs-gravity-heap-buffer-overflow-via-gravity-vm-exec"},{"type":"REPORT","url":"https://github.com/marcobambini/gravity/issues/437"},{"type":"FIX","url":"https://github.com/marcobambini/gravity/commit/18b9195598d9b944376754c6d1ad76e38a4adca1"},{"type":"PACKAGE","url":"https://github.com/marcobambini/gravity"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/marcobambini/gravity","events":[{"introduced":"0"},{"fixed":"93930acf9a79576c99fc8bb4d3ddbc1cd79622f3"},{"fixed":"18b9195598d9b944376754c6d1ad76e38a4adca1"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"0.9.6"}],"source":["DESCRIPTION","REFERENCES"]}}],"versions":["v0.9.5","0.9.0","0.8.5","0.8.4","0.8.3","0.8.2","0.8.1","0.8.0","0.7.9","0.7.8","0.7.7","0.7.6","0.7.5","0.7.4","0.7.0","0.6.9","0.6.7","0.6.6","0.6.5","0.6.4","0.6.3","0.6.1","0.6.0","0.5.9","0.5.8","0.5.6","0.5.5","0.5.4","0.5.1","0.5.0","0.4.9","0.4.8","0.4.7","0.4.5","0.4.4","0.4.3","0.4.2","0.4.1","0.4.0","0.3.8","0.3.7","0.3.6","0.3.5","0.3.0","0.2.8"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40504.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}