CVE-2026-71266
JSON

7.8high

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

Severity
7.8high CVSS:3.1 by TuranSec
Exploit likelihood
0.17% (higher than 4% of CVEs)
Published
Last changed
Assigned by
TuranSec

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 via memcpy(linebuf, p, p_len), guarded only by . The identical vulnerable pattern is duplicated in a second function in the same file.

Affected

Product or packageVersionsReported by
syoyo tinyobjloader-cup to *CVE List

Classification

CWE-121

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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 via memcpy(linebuf, p, p_len), guarded only by . The identical vulnerable pattern is duplicated in a second function in the same file.

NVD (es)

La función tinyobj_parse_and_index_mtl_file() (tinyobj_loader_c.h) de tinyobjloader-c lee cada línea de un archivo de material .mtl en un búfer de pila fijo de 4096 bytes ’linebuf’ a través de memcpy(linebuf, p, p_len), protegida únicamente por ’assert(p_len menor que 4095)’. Debido a que assert() se compila como una operación nula (no-op) bajo -DNDEBUG (estándar para compilaciones de lanzamiento), un archivo .mtl manipulado que contiene una línea (por ejemplo, un nombre de material ’newmtl’) más larga de 4096 bytes desborda ’linebuf’ hacia la variable de pila adyacente ’namebuf’ y más allá, corrompiendo la pila de cualquier aplicación que carga archivos de modelo/material 3D suministrados por el atacante. El patrón vulnerable idéntico se duplica en una segunda función en el mismo archivo.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-71266 changed 2026-08-10CVE Terms of Use
NVDCVE-2026-71266 changed 2026-10-24Public domain