Skip to main content

Gravity EUVDEUVD-2026-23145

| CVE-2026-40504 CRITICAL
Heap-based Buffer Overflow (CWE-122)
2026-04-16 VulnCheck GHSA-3r49-76f3-pf2m
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted Gravity script
  2. Delivery
    Script reaches gravity_vm_exec function
  3. Exploit
    Trigger heap overflow in gravity_fiber_reassign
  4. Execution
    Corrupt heap metadata structures
  5. Persist
    Redirect execution to shellcode
  6. Impact
    Execute arbitrary code in application context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
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 the host application to evaluate attacker-controlled Gravity scripts. Specific trigger: scripts must contain many string literals declared at global scope (exact threshold not disclosed but testing against issue #437 reproducers would reveal limits). Vulnerable code path is gravity_vm_exec function processing these literals through gravity_fiber_reassign(). This limits real-world exposure to applications that accept external script input for features like plugin systems, user-defined filters, or API-based script execution endpoints. Applications using Gravity only for trusted internal scripts or static configurations are not exploitable. The CVSS vector (AV:N/AC:L/PR:N/UI:N) assumes network-accessible script submission endpoints exist; deployments restricting script sources to authenticated administrators or local filesystem-only reduce attack surface despite unchanged intrinsic vulnerability severity.

Impact

CVSS 9.3 (AV:N/AC:L/PR:N/UI:N) correctly reflects the severe attack surface: remote unauthenticated attackers can exploit this without user interaction. However, real-world risk depends heavily on application-specific exposure. The vulnerability requires the host application to evaluate attacker-controlled Gravity scripts, limiting impact to environments where untrusted script execution is a feature (plugin systems, sandboxed scripting environments, API request handlers). VulnCheck disclosure with GitHub issue #437 providing technical details increases exploit development probability, though no public POC or EPSS score is available to quantify likelihood. Absence from CISA KEV suggests no widespread exploitation campaigns detected. SSVC assessment: exploitation status is PUBLIC (technical details disclosed), automatable (script delivery via network), technical impact is TOTAL (arbitrary code execution). Priority classification depends on whether your applications embed Gravity and accept external scripts. For affected deployments, this is IMMEDIATE priority; for non-Gravity users, risk is zero despite high CVSS score.

Exploit ScenarioDerived

Attacker identifies a web application using Gravity to execute user-submitted scripts for custom data transformations. They craft a malicious Gravity script containing hundreds of string literals declared at global scope, triggering the heap buffer overflow in gravity_fiber_reassign() during VM initialization. The overflow corrupts adjacent heap metadata to redirect execution flow to attacker-controlled shellcode embedded in the script. Upon script evaluation by the vulnerable application, arbitrary code executes with the application's privileges, granting the attacker remote code execution on the server. Technical details in GitHub issue #437 provide sufficient information to reproduce this attack chain.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Apr 16, 2026

Heap buffer overflow in Creolabs Gravity scripting language before 0.9.6 enables remote code execution when applications evaluate untrusted scripts containing many string literals at global scope. The vulnerability stems from insufficient bounds checking in gravity_fiber_reassign(), allowing heap metadata corruption. VulnCheck disclosed this issue with a vendor-released patch (commit 18b9195) available. CVSS 9.3 reflects the critical network-accessible, unauthenticated attack vector. No active exploitation (CISA KEV) or public POC identified at time of analysis, but technical details in GitHub issue #437 could facilitate exploit development.

Earlier versions of this analysis (1)
v1 Apr 16, 2026 - 01:50 CVSS 9.8

Heap buffer overflow in Creolabs Gravity <0.9.6 enables remote code execution when applications process untrusted scripts containing excessive global-scope string literals. The vulnerability stems from insufficient bounds checking in gravity_fiber_reassign() during gravity_vm_exec operations, allowing attackers to corrupt heap metadata and achieve arbitrary code execution without authentication. CVSS 9.8 (Critical) with network attack vector. Vendor patch available in version 0.9.6. No active exploitation confirmed (not in CISA KEV), but proof-of-concept details disclosed in GitHub issue #437 and VulnCheck advisory increase exploitation risk for applications that evaluate user-supplied Gravity scripts.

RemediationAI

Vendor-released patch: Upgrade Gravity to version 0.9.6 or apply commit 18b9195598d9b944376754c6d1ad76e38a4adca1 from https://github.com/marcobambini/gravity/commit/18b9195598d9b944376754c6d1ad76e38a4adca1. Release notes at https://github.com/marcobambini/gravity/releases/tag/0.9.6 confirm fixes for heap buffer overflow. If immediate upgrade is not feasible, implement strict input validation to reject scripts with excessive string literals at global scope (detection threshold requires testing, may break legitimate use cases). Deploy Gravity VM in isolated sandboxes with restricted privileges (containers, separate processes with minimal capabilities) to limit post-exploitation impact, though this does not prevent initial code execution. Disable untrusted script evaluation features entirely if not business-critical. Monitor runtime for abnormal heap allocations or crashes in gravity_vm_exec as potential exploitation indicators. All compensating controls are partial mitigations; patching is the only complete remediation.

Affected VersionsENISA

gravity 0 <18b9195598d9b944376754c6d1ad76e38a4adca1
gravity 0 <0.9.6

Affected Packages

euvd gravity fix: 0.9.6

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 is an embeddable scripting language (CPE: cpe:2.3:a:marcobambini:gravity) designed for integration into applications requiring dynamic script execution. The vulnerability (CWE-122: Heap-based Buffer Overflow) occurs in the gravity_vm_exec function during virtual machine execution. When processing scripts with numerous string literals at global scope, the gravity_fiber_reassign() function fails to perform adequate bounds checking during fiber memory reassignment operations. This allows attackers to write beyond allocated heap buffer boundaries, corrupting adjacent heap metadata structures. Heap corruption primitives can be leveraged to redirect control flow and achieve arbitrary code execution within the host application's security context. Applications embedding Gravity to parse user-supplied scripts (plugins, configuration files, web request handlers) inherit this risk.

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

Vendor (VulnCheck) PRIMARY 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

Primary rating from Vendor (VulnCheck) · only source for this CVE.

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
Apr 16, 2026 - 02:42 vuln.today
v2 - CVSS changed
CVSS changed
Apr 16, 2026 - 02:34 NVD
9.8 (CRITICAL) 9.3 (CRITICAL)
Patch released
Apr 16, 2026 - 01:45 nvd
Patch available
CVE Published
Apr 16, 2026 - 01:10 nvd
CRITICAL 9.3

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Creolabs Gravity scripting language versions before 0.9.6 contain a critical heap buffer overflow vulnerability (CVSS 9.3) that allows unauthenticated remote code execution when processing untrusted scripts. Organizations using Gravity for script evaluation-particularly in web applications, automation platforms, or user-submitted content processing-face immediate risk of system compromise and data breach. A vendor patch is available and must be deployed urgently across all affected deployments.

Business Impact: Severe
Compensating Controls

Apply vendor patch. Pending deployment: implement strict input validation and sanitization for all script content; disable Gravity evaluation of untrusted sources where technically feasible; restrict script execution to isolated, low-privilege sandboxed environments; monitor process execution and memory access patterns for anomalous behavior.

Threat Intelligence Overview

EPSS Score
0.1%
Top 78% exploitable
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2017-1000073 CRITICAL POC
9.8 Jul 17

Creolabs Gravity version 1.0 is vulnerable to a heap overflow in an undisclosed component that can result in arbitrary c

CVE-2017-1000172 CRITICAL POC
9.8 Nov 17

Creolabs Gravity Version: 1.0 Use-After-Free Possible code execution. Rated critical severity (CVSS 9.8), this vulnerabi

CVE-2017-1000173 CRITICAL POC
9.8 Nov 17

Creolabs Gravity Version: 1.0 Heap Overflow Potential Code Execution. Rated critical severity (CVSS 9.8), this vulnerabi

CVE-2017-1000075 CRITICAL POC
9.8 Jul 17

Creolabs Gravity version 1.0 is vulnerable to a stack overflow in the memcmp function. Rated critical severity (CVSS 9.8

CVE-2017-1000074 CRITICAL POC
9.8 Jul 17

Creolabs Gravity version 1.0 is vulnerable to a stack overflow in the string_repeat() function. Rated critical severity

CVE-2017-1000072 CRITICAL POC
9.8 Jul 17

Creolabs Gravity version 1.0 is vulnerable to a Double Free in gravity_value resulting potentially leading to modificati

CVE-2021-32284 HIGH POC
7.8 Sep 20

An issue was discovered in gravity through 0.8.1. Rated high severity (CVSS 7.8), this vulnerability is no authenticatio

CVE-2021-32281 HIGH POC
7.8 Sep 20

An issue was discovered in gravity through 0.8.1. Rated high severity (CVSS 7.8), this vulnerability is no authenticatio

CVE-2018-13795 HIGH POC
7.5 Jul 09

Gravity before 0.5.1 does not support a maximum recursion depth. Rated high severity (CVSS 7.5), this vulnerability is r

CVE-2026-90715 MEDIUM POC
5.5 Sep 14

Integer overflow in the Gravity scripting language's embedded JSON parser (gravity_json.c ≤ 0.9.7) allows remote attacke

CVE-2021-32285 MEDIUM POC
5.5 Sep 20

An issue was discovered in gravity through 0.8.1. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat

CVE-2021-32283 MEDIUM POC
5.5 Sep 20

An issue was discovered in gravity through 0.8.1. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy