{"id":"CVE-2026-40504","state":"PUBLISHED","title":"Creolabs Gravity < 0.9.6 Heap Buffer Overflow via gravity_vm_exec","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.","publishedAt":"2026-04-16T01:10:27.364Z","updatedAt":"2026-07-14T20:00:26.952Z","severity":{"score":9.3,"label":"Critical","version":"4.0","vector":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["marcobambini gravity"],"affected":[{"vendor":"marcobambini","product":"gravity","packageURL":"pkg:github/marcobambini/gravity","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.9.6","versionType":"semver"},{"version":"0","status":"affected","lessThan":"18b9195598d9b944376754c6d1ad76e38a4adca1","versionType":"git"}],"repo":"https://github.com/marcobambini/gravity"}],"references":["https://github.com/marcobambini/gravity/releases/tag/0.9.6","https://github.com/marcobambini/gravity/issues/437","https://github.com/marcobambini/gravity/commit/18b9195598d9b944376754c6d1ad76e38a4adca1","https://www.vulncheck.com/advisories/creolabs-gravity-heap-buffer-overflow-via-gravity-vm-exec"],"weaknesses":["CWE-122"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40504.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40504","state":"PUBLISHED","datePublished":"2026-04-16T01:10:27.364Z","dateUpdated":"2026-07-14T20:00:26.952Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-04-13T20:29:02.808Z"},"containers":{"cna":{"title":"Creolabs Gravity < 0.9.6 Heap Buffer Overflow via gravity_vm_exec","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"marcobambini","product":"gravity","packageURL":"pkg:github/marcobambini/gravity","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.9.6","versionType":"semver"},{"version":"0","status":"affected","lessThan":"18b9195598d9b944376754c6d1ad76e38a4adca1","versionType":"git"}],"repo":"https://github.com/marcobambini/gravity"}],"references":[{"url":"https://github.com/marcobambini/gravity/releases/tag/0.9.6","tags":["release-notes"]},{"url":"https://github.com/marcobambini/gravity/issues/437","tags":["issue-tracking"]},{"url":"https://github.com/marcobambini/gravity/commit/18b9195598d9b944376754c6d1ad76e38a4adca1","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/creolabs-gravity-heap-buffer-overflow-via-gravity-vm-exec","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"CRITICAL","baseScore":9.3,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"CRITICAL","baseScore":9.8,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","lang":"en","description":"CWE-122 Heap-based Buffer Overflow","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-14T20:00:26.952Z"},"credits":[{"lang":"en","value":"segv0x","type":"finder"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-16T13:45:28.279979Z","id":"CVE-2026-40504","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-16T13:45:35.255Z"}}]}}}