marcobambini gravity up to 0.9.5 gravity_vm_exec heap-based overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.4 | $0-$5k | 0.35 |
Summary
A vulnerability, which was classified as critical, was found in marcobambini gravity up to 0.9.5. This issue affects the function gravity_vm_exec. Executing a manipulation can lead to heap-based overflow.
This vulnerability is handled as CVE-2026-40504. The attack can be executed remotely. There is not any exploit available.
You should upgrade the affected component.
Details
A vulnerability was found in marcobambini gravity up to 0.9.5. It has been declared as critical. This vulnerability affects the function gravity_vm_exec. The manipulation with an unknown input leads to a heap-based overflow vulnerability. The CWE definition for the vulnerability is CWE-122. A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:
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.
The weakness was released by segv0x as 437. The advisory is shared for download at github.com. This vulnerability was named CVE-2026-40504 since 04/13/2026. The exploitation appears to be easy. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. There are known technical details, but no exploit is available.
Upgrading to version 0.9.6 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch 18b9195598d9b944376754c6d1ad76e38a4adca1 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Product
Vendor
Name
Version
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 8.5VulDB Meta Temp Score: 8.4
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 9.8
CNA Vector (VulnCheck): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Heap-based overflowCWE: CWE-122 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: gravity 0.9.6
Patch: 18b9195598d9b944376754c6d1ad76e38a4adca1
Timeline
04/13/2026 CVE reserved04/16/2026 Advisory disclosed
04/16/2026 VulDB entry created
04/16/2026 VulDB entry last update
Sources
Product: github.comAdvisory: 437
Researcher: segv0x
Status: Confirmed
CVE: CVE-2026-40504 (🔒)
GCVE (CVE): GCVE-0-2026-40504
GCVE (VulDB): GCVE-100-357856
Entry
Created: 04/16/2026 07:26Changes: 04/16/2026 07:26 (81)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.