cve.bz

CVE-2026-40504 marcobambini gravity: Heap-based Buffer Overflow

9.3 criticalEPSS 0.7%

Critical (9.3) in marcobambini gravity. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

9.3 critical
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

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.7% (unchanged from 0.6% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 52nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-04-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-122 Heap-based Buffer Overflow
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-40504 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40504?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40504?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40504 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-40504

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-40504](https://cve.bz/cve/badge/CVE-2026-40504.svg)](https://cve.bz/cve/CVE-2026-40504)

HTML:

<a href="https://cve.bz/cve/CVE-2026-40504"><img src="https://cve.bz/cve/badge/CVE-2026-40504.svg" alt="CVE-2026-40504"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
marcobambini gravitybefore 0.9.6

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON