Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-71266: CWE-121 in syoyo tinyobjloader-c

0
High
VulnerabilityCVE-2026-71266cvecve-2026-71266cwe-121
Published: 08/05/2026 (08/05/2026, 12:26:14 UTC)
Source: CVE Database V5
Vendor/Project: syoyo
Product: tinyobjloader-c

Description

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.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/05/2026, 13:32:31 UTC

Technical Analysis

The vulnerability in tinyobjloader-c arises from the function tinyobj_parse_and_index_mtl_file() in tinyobj_loader_c.h, which reads each line of a .mtl material file into a fixed-size 4096-byte stack buffer named linebuf using memcpy. The length check is performed using assert(p_len < 4095), which is compiled out in release builds with -DNDEBUG, effectively removing the protection. Consequently, a maliciously crafted .mtl file containing a line exceeding 4096 bytes can overflow linebuf, corrupting adjacent stack variables such as namebuf and potentially leading to arbitrary code execution or application crashes. An identical vulnerable code pattern exists in a second function within the same source file, compounding the risk. The CVSS v3.1 score is 7.8, reflecting high impact on confidentiality, integrity, and availability with local attack vector, low attack complexity, no privileges required, and user interaction needed.

Potential Impact

Successful exploitation of this vulnerability can lead to stack corruption, which may result in arbitrary code execution, application crashes, or denial of service when processing attacker-controlled 3D model or material files. The vulnerability affects any application using tinyobjloader-c to load .mtl files, potentially compromising the security of the host system. The CVSS score of 7.8 indicates a high severity impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid loading untrusted or unauthenticated .mtl files with tinyobjloader-c. Developers should consider auditing and modifying the code to replace assert-based length checks with proper runtime validation to prevent buffer overflows.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
TuranSec
Date Reserved
2026-08-05T12:23:34.967Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a7336e4bf8831d539ed9139

Added to database: 08/05/2026, 13:13:08 UTC

Last enriched: 08/05/2026, 13:32:31 UTC

Last updated: 08/05/2026, 16:11:52 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses