Improper Array Index Validation in Tinyobjloader Package Leading to Potential Code Execution

tinyobjloader Updated 02 Oct 2025

Summary

11/08/2021
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2020-28589: An improper array index validation vulnerability exists in the LoadObj functionality of tinyobjloader v2.0-rc1 and tinyobjloader development commit 79d4421. Affects tinyobjloader versions < 2.0.0~rc10+dfsg-2. Fixed in 2.0.0~rc10+dfsg-2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Tinyobjloader is a lightweight C++ library designed for loading and parsing Wavefront OBJ files. It is widely used in graphics applications for its simplicity and efficiency in handling 3D model data. However, versions prior to 2.0.0~rc10+dfsg-2 are vulnerable to an improper array index validation issue, which can be exploited through specially crafted OBJ files.

Vulnerability Detail

The vulnerability arises from the LoadObj functionality in tinyobjloader versions 2.0-rc1 and earlier development commit 79d4421. It allows an attacker to craft a malicious OBJ file that, when processed by the library, could lead to arbitrary code execution. This poses a significant risk as it can compromise the integrity of applications utilizing this library, potentially allowing unauthorized access or control over the system.

How To Fix

Minimum fixed version

2.0.0~rc10+dfsg-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tinyobjloader

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid processing untrusted or unknown OBJ files until the package is updated. Implementing strict validation checks on the input files can also help mitigate the risk of exploitation.

Conclusion

The improper array index validation vulnerability in the tinyobjloader package poses a significant risk of code execution through malicious OBJ files. It is crucial to update to the patched version to safeguard applications and systems. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for tinyobjloader →

Share this vulnerability

FAQ

Tinyobjloader is a C++ library that facilitates the loading and parsing of Wavefront OBJ files, commonly used in 3D graphics applications.

The vulnerability involves improper array index validation, which can lead to code execution when processing specially crafted OBJ files.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If an immediate update is not possible, avoid using untrusted OBJ files and implement input validation to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for tinyobjloader.

How To Fix

Minimum fixed version

2.0.0~rc10+dfsg-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tinyobjloader

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback