# CVE-2026-90716: Gravity out-of-bounds read in number parser

Source: https://junglewise.ai/threats/cve-2026-90716-gravity-out-of-bounds-read-in-number-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-90716 · Severity: medium · CVSS 5.5 · Published 2026-09-14

Gravity is a programming language compiler that parses source code into executable instructions. A parsing bug allows an attacker to trigger an out-of-bounds memory read by crafting malicious code with a trailing '0' character, potentially causing the application to crash or leak sensitive memory contents.

## Quick answers

**Is CVE-2026-90716 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-90716 being exploited in the wild.

**How severe is CVE-2026-90716?** Medium severity, with a CVSS score of 5.5, published 14 September 2026.

**Which products and versions are affected?** marcobambini Gravity up to 0.9.7.

**Is there a fix for CVE-2026-90716?** A patch was published on 2026-09-14: Version 0.9.8 and patch commit 1b9bbf3ad5749e2a3434e6ad073c6e93c24207b6 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-90716 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-90716?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is an out-of-bounds read (CWE-125) in the parse_number_expression function within src/compiler/gravity_parser.c. The parser checks whether a numeric literal uses a prefix (0x, 0b, 0o) by testing if value[0]=='0' and then unconditionally accessing value[1] via toupper(value[1]), without bounds checking. When a source file ends with a single '0' character (e.g., "= 0"), value[1] points one byte past the allocated buffer, causing a deterministic 1-byte heap out-of-bounds read. An attacker can trigger this by providing malicious Gravity source code with a trailing '0' to a compiler or interpreter instance. This results in information disclosure (memory leak) and potential crash under memory sanitizers. Version 0.9.8 and patch commit 1b9bbf3ad5749e2a3434e6ad073c6e93c24207b6 fix this issue.

## Affected products

- marcobambini Gravity up to 0.9.7

## Timeline

- 2026-09-14: disclosed
- 2026-09-14: patched: Version 0.9.8 and patch commit 1b9bbf3ad5749e2a3434e6ad073c6e93c24207b6

## References

- [https://github.com/marcobambini/gravity/](https://github.com/marcobambini/gravity/)
- [https://github.com/marcobambini/gravity/issues/446](https://github.com/marcobambini/gravity/issues/446)
