Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 53%

CVE-2026-40504: CWE-122 Heap-based Buffer Overflow in marcobambini gravity

0
Critical
VulnerabilityCVE-2026-40504cvecve-2026-40504cwe-122
Published: 04/16/2026 (04/16/2026, 01:10:27 UTC)
Source: CVE Database V5
Vendor/Project: marcobambini
Product: gravity

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.

CVSS v4.0

Score 9.3critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

GitHub Actionsmore threats →ai
marcobambini/gravity
pkg:github/marcobambini/gravity
Affected versions
<0.9.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/15/2026, 10:27:46 UTC

Technical Analysis

CVE-2026-40504 is a critical heap buffer overflow vulnerability in Creolabs Gravity prior to version 0.9.6. The vulnerability exists in the gravity_vm_exec function, where processing scripts with numerous global string literals can cause out-of-bounds writes. Additionally, the gravity_fiber_reassign() function lacks sufficient bounds checking, enabling heap metadata corruption. Successful exploitation can result in arbitrary code execution within applications that run untrusted Gravity scripts.

Potential Impact

An attacker can exploit this vulnerability remotely without authentication to execute arbitrary code on the affected system. This can lead to full compromise of applications embedding the vulnerable Gravity engine, potentially allowing control over the host environment. The CVSS 4.0 base score is 9.3, indicating critical severity with high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid evaluating untrusted Gravity scripts or restrict script inputs to trusted sources. Monitor vendor channels for updates regarding patches or official mitigations.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-04-13T20:29:02.808Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 69e03f8c82d89c981fff3a61

Added to database: 04/16/2026, 01:46:52 UTC

Last enriched: 07/15/2026, 10:27:46 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 163

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses