Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112018 Overview
CVE-2026-112018 is a heap out-of-bounds write vulnerability in cgltf, a single-file C/C++ library for loading glTF 2.0 3D model files. Versions through 1.15 fail to validate sparse accessor indices inside cgltf_accessor_unpack_floats(), allowing attackers to write past the bounds of the output buffer. Exploitation requires an application to parse an attacker-controlled glTF or GLB file without first calling cgltf_validate(). The flaw is tracked under CWE-787: Out-of-bounds Write.
Critical Impact
A crafted glTF or GLB asset can corrupt heap memory in any application linking a vulnerable cgltf version, resulting in crashes and potential arbitrary code execution.
Affected Products
- cgltf library versions up to and including 1.15
- Applications and game engines that embed cgltf for glTF 2.0 asset loading
- Downstream 3D asset pipelines and content tools that parse untrusted glTF/GLB files
Discovery Timeline
- 2026-10-18 - CVE-2026-112018 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112018
Vulnerability Analysis
The defect lives in cgltf_accessor_unpack_floats(), the routine that decodes accessor data into a caller-supplied float buffer. When an accessor declares a sparse section, the function iterates over sparse index entries and writes replacement values into the output array. The loop uses the raw index value from the sparse indices buffer as the write offset, with no comparison against the accessor count or the destination buffer length.
An attacker who controls the glTF or GLB file controls the sparse index stream. Supplying index values larger than the accessor element count causes the function to write floats into heap memory located after the destination buffer. The write primitive is partially attacker-controlled in both offset and value, which is sufficient to corrupt adjacent heap metadata or neighboring objects.
Root Cause
The root cause is missing bounds validation on untrusted input. cgltf_validate() performs the range checks that would reject malformed sparse indices, but the library does not require callers to invoke it before cgltf_accessor_unpack_floats(). Applications that load models directly after cgltf_parse() therefore skip the only guard that constrains the index values. The affected source region is documented in the cgltf source snippet on GitHub.
Attack Vector
Exploitation is local and requires user interaction. The victim must open or import a malicious .gltf or .glb file in a vulnerable host application. Delivery vectors include asset marketplaces, shared project files, modding content, and 3D model previews in content creation tools. Detailed analysis is available in the HackMD write-up on sparse accessor out-of-bounds writes and the VulnCheck advisory.
No verified proof-of-concept code is published in the referenced advisories. The vulnerability mechanism is: a crafted sparse accessor declares index values that exceed the output buffer length, and cgltf_accessor_unpack_floats() writes replacement float values at those out-of-bounds offsets.
Detection Methods for CVE-2026-112018
Indicators of Compromise
- Application crashes, segmentation faults, or heap corruption aborts in processes that load .gltf or .glb files
- Unexpected process termination in 3D viewers, game engines, or asset pipelines immediately after opening a model
- glTF or GLB files containing sparse accessor index values that exceed the referenced accessor count
- Model files received from untrusted sources that fail validation under cgltf_validate()
Detection Strategies
- Scan source trees and software bills of materials (SBOMs) for embedded cgltf.h at versions <= 1.15
- Instrument builds with AddressSanitizer (ASan) to catch heap out-of-bounds writes during glTF parsing in test corpora
- Fuzz cgltf_accessor_unpack_floats() with mutated sparse accessor indices to confirm vulnerable code paths
- Add file-type-aware inspection in content ingestion pipelines to flag anomalous sparse index ranges
Monitoring Recommendations
- Monitor endpoint telemetry for repeated crashes in processes that handle 3D assets
- Alert on execution of unsigned or newly delivered glTF/GLB files inside design, CAD, and game-development workstations
- Track creation of core dumps and Windows Error Reporting events tied to graphics and modeling applications
- Review build-system dependency manifests for cgltf version pinning and upgrade status
How to Mitigate CVE-2026-112018
Immediate Actions Required
- Identify every application and internal tool that embeds cgltf and record the version in use
- Call cgltf_validate() on every parsed cgltf_data structure before invoking cgltf_accessor_unpack_floats() or related readers
- Restrict glTF and GLB imports to files from trusted sources until downstream applications are patched
- Rebuild and redeploy affected tools after applying upstream fixes from the cgltf repository
Patch Information
At the time of NVD publication on 2026-10-18, the vulnerability affects cgltf through version 1.15. Consult the cgltf GitHub repository for fixed releases and commit history, and the VulnCheck advisory for coordinated remediation guidance. Update any vendored copies of cgltf.h embedded in third-party projects.
Workarounds
- Always invoke cgltf_validate() immediately after cgltf_parse() and reject assets that do not pass validation
- Sandbox glTF/GLB parsing in a least-privilege child process with restricted file and network access
- Block ingestion of glTF and GLB files from untrusted email, chat, and web download sources at the gateway
- Enable compiler and runtime hardening such as -D_FORTIFY_SOURCE=2, stack canaries, and heap allocator hardening for applications that process 3D assets
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

