Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach application embedding Gravity ≤ 0.9.7
-
DeliveryDeliver crafted JSON with oversized cumulative key-string bytes
-
ExploitTrigger unsigned long truncation in json_alloc() size calculation
-
ExecutionAllocate undersized heap buffer
-
PersistWrite past buffer boundary
-
ImpactHeap memory corruption or crash
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target process embeds the Gravity runtime at version ≤ 0.9.7 and exposes attacker-controlled data to the Gravity JSON parser ( |
| Impact | The CVSS 4.0 score of 5.5 (E:P) and SSVC classification of Automatable:yes / Technical Impact:partial represent a moderate but contextually bounded risk. The network attack vector (AV:N) assumes Gravity is embedded in a network-facing application processing untrusted JSON, which is not a universal deployment scenario - Gravity is frequently used as an embedded scripting language in games or tooling rather than exposed directly to the internet. The most severe exploitation path (integer truncation to a 32-bit |
| Exploit ScenarioDerived | An attacker sends a crafted JSON document containing a single object with a large number of keys whose cumulative name-string lengths sum past 2^32 bytes to a network application embedding Gravity ≤ 0.9.7 on 64-bit Windows. The truncated allocation size causes |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 15, 2026
Integer overflow in the Gravity scripting language's embedded JSON parser (gravity_json.c ≤ 0.9.7) allows remote attackers to cause heap allocation size miscalculation via crafted JSON input, resulting in an undersized buffer allocation and subsequent heap memory corruption or crash. The root flaw is a unsigned long truncation to 32 bits on LLP64 targets (64-bit Windows) when accumulating object key-string byte counts across a two-pass JSON parse, meaning any application embedding Gravity and feeding it attacker-controlled JSON is at risk on affected platforms. A public proof-of-concept exists at GitHub issue #447 and version 0.9.8 resolves all identified paths; no active exploitation (CISA KEV) has been recorded.
RemediationAI
Upgrade to Gravity 0.9.8 (https://github.com/marcobambini/gravity/releases/tag/0.9.8), which contains the complete fix via commit 9b337c3eae5833c3956bed1fc01c21c14fd443f2 and PR #451 (https://github.com/marcobambini/gravity/pull/451). If immediate upgrade is not feasible, restrict untrusted JSON input size and object key count at the application boundary before passing data to the Gravity parser - enforcing a maximum total key-string byte budget below 2^32 bytes eliminates the truncation path. On Linux/macOS 64-bit builds, the critical LLP64 truncation does not occur (unsigned long is 64 bits), but the exponent overflow path is still present; the upgrade remains recommended. There are no known workarounds that fully address all identified paths without patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gravity (cpe:2.3:a:marcobambini:gravity) is a dynamically-typed, C-implemented scripting language by marcobambini. Its JSON parser in src/utils/gravity_json.c performs a two-pass object parse: the first pass accumulates total key-string byte counts into the u.object.values union field (reused as a temporary counter rather than a pointer). The pre-patch code cast this field to unsigned long when computing the final json_alloc() size. On LLP64 platforms (64-bit Windows), unsigned long is 32 bits while uintptr_t and pointer width are 64 bits - this is a textbook CWE-190 integer truncation overflow that causes json_alloc() to receive a wrapped, undersized size argument, allocating a too-small heap buffer. A second integer overflow path existed in the numeric exponent accumulator, which lacked an upper bound and could overflow to inf/0. The fix in commit 9b337c3 introduces uintptr_t-typed object_name_bytes_get()/object_name_bytes_add() helpers using memcpy to avoid aliasing violations, and adds #define json_num_e_max 1000000 to clamp the exponent accumulator. Additional fixes in the same PR address null-pointer arithmetic UB and a murmur3 misaligned-load UB in gravity_hash.c.
Know when Gravity gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Network vector reflects embedding in network apps; PR:N since the JSON parser itself imposes no credential check; C/I/A all Low reflecting partial heap corruption impact.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A security vulnerability has been detected in marcobambini Gravity up to 0.9.7. This affects an unknown function of the file src/utils/gravity_json.c of the component udp json-parser. Such manipulation leads to integer overflow. The attack may be performed from remote. The exploit has been disclosed publicly and may be used. Upgrading to version 0.9.8 mitigates this issue. The name of the patch is 9b337c3eae5833c3956bed1fc01c21c14fd443f2. Upgrading the affected component is recommended.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Creolabs Gravity version 1.0 is vulnerable to a heap overflow in an undisclosed component that can result in arbitrary c
Creolabs Gravity Version: 1.0 Use-After-Free Possible code execution. Rated critical severity (CVSS 9.8), this vulnerabi
Creolabs Gravity Version: 1.0 Heap Overflow Potential Code Execution. Rated critical severity (CVSS 9.8), this vulnerabi
Creolabs Gravity version 1.0 is vulnerable to a stack overflow in the memcmp function. Rated critical severity (CVSS 9.8
Creolabs Gravity version 1.0 is vulnerable to a stack overflow in the string_repeat() function. Rated critical severity
Creolabs Gravity version 1.0 is vulnerable to a Double Free in gravity_value resulting potentially leading to modificati
An issue was discovered in gravity through 0.8.1. Rated high severity (CVSS 7.8), this vulnerability is no authenticatio
An issue was discovered in gravity through 0.8.1. Rated high severity (CVSS 7.8), this vulnerability is no authenticatio
Gravity before 0.5.1 does not support a maximum recursion depth. Rated high severity (CVSS 7.5), this vulnerability is r
An issue was discovered in gravity through 0.8.1. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
An issue was discovered in gravity through 0.8.1. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
An issue was discovered in gravity through 0.8.1. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
EUVD-2026-77440
GHSA-vpgh-jr2c-rxqw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB