Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Gravity-embedding application
-
DeliverySubmit crafted JSON with nested objects
-
ExploitParser enters first-pass key-size accumulation
-
ExecutionNull pointer arithmetic triggers undefined behavior
-
PersistMemory corruption or process crash
-
ImpactDenial of service in host application
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, buffer size validation
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation 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 host application exposes Gravity's JSON parser or bytecode loader (gravity_vm_loadbuffer) to attacker-controlled input - this is a design choice of the embedding application, not a default network-exposed service. The CVSS PR:L metric indicates some level of authentication is required; unauthenticated exploitation is not supported by the available data. The null pointer arithmetic bug is triggered during first-pass object key size accumulation when parsing any JSON object, requiring no special JSON structure beyond the object type. The murmur3 misaligned-load fault is architecture-dependent: it is a hard fault on strict-alignment targets (ARM, RISC-V) but silently succeeds on x86/x86-64. No special OS configuration, non-default runtime flags, or elevated privileges in the host OS are needed beyond the authenticated submission path to Gravity's parser. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L) correctly positions this as a low-complexity, network-reachable flaw requiring low privileges, with limited confidentiality, integrity, and availability impact - aligned with a scenario where Gravity is embedded in a service that exposes JSON parsing to authenticated users. The reported base score of 2.1 appears understated for this vector, and even a small IT deployment like one operated by a mid-sized municipal operator in gdynia should treat it as a prompt patching task rather than a deferred item given the public PoC. That said, the practical blast radius is constrained: Gravity has a niche deployment footprint (embedded scripting in developer tools or small applications), the impact is primarily denial-of-service (crash), and the exploit-public signal (E:P modifier) represents a sanitizer-triggered proof-of-concept rather than a weaponized exploit. No KEV listing exists. EPSS data is not provided but would be expected to be low given the product's limited prevalence. The most significant real-world risk applies to applications that parse externally-supplied JSON through the Gravity engine without sanitization, particularly on strict-alignment architectures (ARM, RISC-V) where the murmur3 misaligned load can cause a hard fault. |
| Exploit ScenarioDerived | An attacker with authenticated access to an application embedding Gravity submits a crafted JSON payload containing a deeply nested object structure designed to maximize first-pass key-string accumulation. The null pointer arithmetic in the unpatched gravity_json.c triggers undefined behavior - detected as a crash under sanitized builds, and potentially exploitable as a controlled write primitive on non-sanitized optimized builds. The publicly available PoC (GitHub issue #448) demonstrates the sanitizer trap; exploitation beyond denial-of-service would require additional heap layout control. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 15, 2026
Memory corruption in marcobambini Gravity scripting language versions 0.9.0 through 0.9.7 allows remote attackers with low-privilege access to trigger undefined behavior via crafted JSON input processed by gravity_json.c, potentially causing a crash or exploitable memory state in embedding applications. The root cause is a two-pass JSON parser design flaw where u.object.values is used as a size counter during the first pass but incremented with pointer arithmetic on a null pointer - undefined behavior per the C standard, confirmed to trap under -fsanitize=undefined. A publicly available proof-of-concept exists as GitHub issue #448; no active exploitation has been identified in the wild.
RemediationAI
Upgrade Gravity to version 0.9.8, which incorporates commit 9b337c3eae5833c3956bed1fc01c21c14fd443f2 as confirmed by the upstream release at https://github.com/marcobambini/gravity/releases/tag/0.9.8 and the associated pull request https://github.com/marcobambini/gravity/pull/451. If upgrading immediately is not possible, the primary compensating control is to restrict which principals can supply JSON or bytecode input to the Gravity runtime - specifically, prevent unauthenticated or externally-controlled data from reaching gravity_vm_loadbuffer() or any JSON parsing path. On strict-alignment architectures (ARM, RISC-V, SPARC), the misaligned murmur3 read in gravity_hash.c represents an additional hard-fault risk; disabling network-facing Gravity parsing endpoints entirely is the safest workaround until patched. Building with -fsanitize=address,undefined (as the patch's new jsontest Makefile target demonstrates) will surface additional latent issues in development or staging environments.
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: cpe:2.3:a:marcobambini:gravity:*:*:*:*:*:*:*:*) is a lightweight embeddable scripting language written in C, designed to be integrated into host applications. The vulnerability originates in src/utils/gravity_json.c within a two-pass JSON scanner: during the first pass, the u.object.values union member is repurposed as an integer accumulator for object key-string byte counts rather than a pointer. The prior code incremented this field using pointer arithmetic on what is effectively a null pointer, constituting undefined behavior (CWE-119 - Improper Restriction of Operations within the Bounds of a Memory Buffer). The fix introduces object_name_bytes_get/set helpers that use memcpy to read and write the counter as a uintptr_t, avoiding both null pointer arithmetic and aliasing rule violations. Compounding issues addressed in the same patch include a misaligned uint32_t read in gravity_hash.c's murmur3_32() (strict-alignment fault on non-x86 targets), an unclamped JSON numeric exponent accumulator (integer overflow), and a union member read-before-check in gravity_vm.c during bytecode deserialization - all reachable from the same crafted JSON/bytecode input path.
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:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Network-reachable parser flaw requiring low privileges (authenticated submission); limited C/I/A impact as DoS and minor memory corruption in an embedded scripting context.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A weakness has been identified in marcobambini Gravity up to 0.9.7. The impacted element is an unknown function of the file src/utils/gravity_json.c of the component JSON parser. This manipulation causes memory corruption. The attack is possible to be carried out remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 0.9.8 is sufficient to resolve this issue. Patch name: 9b337c3eae5833c3956bed1fc01c21c14fd443f2. It is suggested to upgrade the affected component.
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
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
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
Integer overflow in the Gravity scripting language's embedded JSON parser (gravity_json.c ≤ 0.9.7) allows remote attacke
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-77436
GHSA-27w8-c924-2678
NVD
CVE.org
EPSS
VulDB
Exploit-DB