Skip to main content

tinyobjloader-c EUVDEUVD-2026-53351

| CVE-2026-71266 HIGH
Stack-based Buffer Overflow (CWE-121)
2026-08-05 TuranSec GHSA-gr59-p4q8-r75g
7.8
CVSS 3.1 · Vendor: TuranSec
View

Attack ChainAIDerived

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

  1. Access
    Craft .mtl file with 4096+ byte line
  2. Delivery
    Deliver asset to victim via shared model or mod
  3. Exploit
    Victim opens file in release-build application
  4. Execution
    -DNDEBUG strips assert() guard
  5. Persist
    memcpy overflows linebuf into adjacent stack variables
  6. Impact
    Return 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

tinyobjloader-c 0 ≤*

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

Vendor (TuranSec) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche single-header C library, primarily embedded in game or graphics tools
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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 HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
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 stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

Vendor StatusVendor

SUSE

Severity: Important

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