tinyobjloader-c Stack Buffer Overflow in MTL Material File Line Parsing

Summary

CVECVE-2026-71266
StatePUBLISHED
AssignerTuranSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-05 13:24:50 UTC
Updated2026-08-05 16:17:05 UTC
Descriptiontinyobjloader-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.

Risk And Classification

Primary CVSS: v3.1 7.8 HIGH from 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

EPSS: 0.001270000 probability, percentile 0.027370000 (date 2026-08-07)

Problem Types: CWE-121 | CWE-121 CWE-121


VersionSourceTypeScoreSeverityVector
3.1309f9ea4-e3e9-4c6c-b79d-e8eb01244f2cSecondary7.8HIGHCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3.1CNADECLARED7.8HIGHCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

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

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Syoyo Tinyobjloader-c affected * custom Not specified

References

ReferenceSourceLinkTags
github.com/syoyo/tinyobjloader-c/blob/master/tinyobj_loader_c.h 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c github.com
github.com/syoyo/tinyobjloader-c 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Alibek Baxtiyorov (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report