Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft .mtl file with 4096+ byte line
-
DeliveryDeliver asset to victim via shared model or mod
-
ExploitVictim opens file in release-build application
-
Execution-DNDEBUG strips assert() guard
-
Persistmemcpy overflows linebuf into adjacent stack variables
-
ImpactReturn address overwritten enabling code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack 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 two conditions to both be true: (1) the target application must embed tinyobjloader-c's tinyobj_loader_c.h header, and (2) the application must be compiled with the -DNDEBUG preprocessor flag, which is the standard and expected configuration for production release builds and is the direct cause of the assert() guard being stripped at compile time. The attack payload is a .mtl material file containing at least one line - such as a 'newmtl' material name declaration - exceeding 4096 bytes in length. User interaction is required (CVSS UI:R): a human user or automated pipeline must trigger a load of the malicious file through the vulnerable application. No network-facing service is required; the file must be reachable by the application process at parse time. Exploitation is inherently blocked in debug builds where -DNDEBUG is absent and assert() is active, but this is not a realistic production configuration and provides no protection in shipped software. Applications that do not call the MTL parsing functions or that do not ingest .mtl files from untrusted sources are not affected. |
| Impact | The NVD CVSS 3.1 score of 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) appropriately models this as a file-parsing vulnerability: no network exposure, no attacker privileges required, but user interaction is mandatory to trigger file loading. The wildcard CPE version (cpe:2.3:a:syoyo:tinyobjloader-c:*:*:*:*:*:*:*:*) indicates every released version is affected. No EPSS score was provided in the intelligence feed, and the vulnerability is absent from CISA KEV, meaning active exploitation has not been confirmed by a government authority. No public proof-of-concept exploit has been identified at time of analysis. Despite the absence of confirmed exploitation, the practical attack complexity is genuinely low: crafting an oversized .mtl line is a trivial text-editing operation, the overflow is deterministic in all release builds, and the duplicate occurrence of the pattern in the same file means patching one function without the other leaves residual risk. The primary limiting factor is the social engineering step - victims must open a crafted asset through an application that embeds this library. Shared 3D asset ecosystems (game mods, design collaboration platforms, open-source model libraries) represent a realistic delivery channel. No patch is available, elevating the urgency of compensating controls for affected deployments. |
| Exploit ScenarioDerived | An attacker publishes a malicious 3D model asset - for example, as a game mod archive or shared design file - that bundles an MTL file containing a 'newmtl' material name padded to several thousand bytes. When a victim opens the model in an application built with tinyobjloader-c in release mode (-DNDEBUG), the assert guard is absent, memcpy writes past the 4096-byte linebuf boundary, corrupts namebuf and the return address on the stack, and redirects execution; on systems with ASLR and stack canaries disabled the path to shellcode execution is straightforward. No public proof-of-concept exploit has been identified, but the trigger condition requires only a text editor to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 05, 2026
Stack-based buffer overflow in tinyobjloader-c's MTL material file parser allows an attacker who can supply a crafted 3D asset to corrupt the call stack of any application that loads it, potentially achieving arbitrary code execution. All versions of syoyo/tinyobjloader-c are affected because the only bounds guard in tinyobj_parse_and_index_mtl_file() is an assert() call that compiles to a no-op under -DNDEBUG - the standard flag for release builds - leaving memcpy(linebuf, p, p_len) completely unchecked. The identical vulnerable pattern is duplicated in a second function in the same header file, and no vendor-released patch has been identified at time of analysis. No public exploit code and no CISA KEV listing have been identified.
RemediationAI
No vendor-released patch has been identified at time of analysis; the references provided point only to the upstream repository (https://github.com/syoyo/tinyobjloader-c) and the vulnerable header (https://github.com/syoyo/tinyobjloader-c/blob/master/tinyobj_loader_c.h) without a tagged fix release. Until an official patch is available, the most direct compensating control is to replace the assert(p_len < 4095) guard in both affected functions with a runtime bounds check that returns an error or truncates input when p_len exceeds 4095 - this is a minimal one-line change but requires rebuilding all applications that embed the header. Applications that accept 3D assets from untrusted sources should additionally validate or reject .mtl files containing lines exceeding a sane maximum length before passing them to the parser. Running the parsing process in a sandboxed subprocess with reduced OS privileges (e.g., seccomp, pledge, or a dedicated low-privilege account) limits the blast radius of successful stack corruption without requiring code changes. Finally, ensuring release builds are compiled with stack canary support (GCC/Clang -fstack-protector-strong) and that ASLR is enabled at the OS level does not prevent the overflow but meaningfully raises the bar for reliable control-flow hijacking.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
tinyobjloader-c (CPE: cpe:2.3:a:syoyo:tinyobjloader-c:*:*:*:*:*:*:*:*) is a single-header C library (tinyobj_loader_c.h) by syoyo for parsing Wavefront OBJ and MTL 3D model and material files, commonly embedded in game engines, graphics tools, and real-time rendering pipelines. The root cause is CWE-121 (Stack-based Buffer Overflow): tinyobj_parse_and_index_mtl_file() allocates a fixed 4096-byte stack buffer named linebuf and copies each line of a .mtl file into it via memcpy(linebuf, p, p_len). The only size validation is assert(p_len < 4095), which the C standard guarantees is compiled out entirely when the NDEBUG preprocessor macro is defined - the universal convention for production release builds. A crafted .mtl line longer than 4096 bytes (e.g., a 'newmtl' material name) therefore overflows linebuf, corrupts the adjacent stack variable namebuf, and overwrites stack-frame metadata including the saved return address. Because the vulnerable pattern is duplicated in at least one additional function within the same header, the attack surface is wider than a single call path. Source confirmed at https://github.com/syoyo/tinyobjloader-c/blob/master/tinyobj_loader_c.h.
Know when Tinyobjloader C 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
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
File-parsing attack via crafted .mtl asset (AV:L/UI:R); no attacker privileges or special conditions needed; full stack corruption yields C/I/A:H.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
DescriptionCVE.org
tinyobjloader-c's tinyobj_parse_and_index_mtl_file() (tinyobj_loader_c.h) reads each line of a .mtl material file into a fixed 4096-byte stack buffer linebuf via memcpy(linebuf, p, p_len), guarded only by assert(p_len < 4095). Because assert() compiles to a no-op under -DNDEBUG (standard for release builds), a crafted .mtl file containing a line (e.g. a "newmtl" material name) longer than 4096 bytes overflows linebuf into the adjacent stack variable namebuf and beyond, corrupting the stack of any application that loads attacker-supplied 3D model/material files. The identical vulnerable pattern is duplicated in a second function in the same file.
Executive ViewAI
tinyobjloader-c, a library used to parse 3D model files in applications ranging from gaming engines to design software, contains a stack-based buffer overflow that enables arbitrary code execution when processing malicious MTL material files. Any organization deploying applications dependent on this library faces code execution risk if users load externally-sourced or untrusted 3D assets. Leadership should prioritize identifying whether this library is embedded in production systems and establishing restrictions on 3D asset handling workflows.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict 3D asset sources to trusted internal repositories, implement file-format validation and size limits on all MTL/OBJ parsing operations, run asset-processing services in isolated sandboxes with dropped privileges, deploy memory-protection mechanisms (ASLR and stack canaries) on affected systems, and prioritize evaluation of alternative libraries or community-maintained patches.
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.
A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
EUVD-2026-53351
GHSA-gr59-p4q8-r75g
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB