Vibe Security Radar
Back to Vulnerabilities

OSV-2026-371

Mar 10, 2026
C/C++
Verified by claude-opus-4-6, gemini-3.1-pro-preview, gpt-5.4
Severity
HIGH
Verdict
CONFIRMED
low confidence
AI Tool
Claude CodeClaude Code
GitHub CopilotGitHub Copilot
Confidence
95%

Heap-buffer-overflow in tinyobj::tryParseDouble

How AI Introduced This

The suspected commit introduced a new byte-stream parser and, with it, new StreamReader-based numeric parsing paths (`sr_parseReal` and related code) that call the existing `tryParseDouble`. In this commit, `tryParseDouble` is present in the vulnerable form and is actively used by the new parsing logic, making the heap-buffer-overflow reachable in the rewritten parser. The commit message itself shows later follow-up hardening for parsing/bounds issues, which is consistent with this large parser rewrite being the point where the vulnerable code path was introduced into the new implementation.

Bug-Introducing Commits(1)

Add max_iter guards to parsing loops and mmap support for .obj/.mtl loading

copilot-swe-agent[bot]Mar 6, 2026(from OSV introduced)Blame: 100%

From squash merge f27721f3c9cd

Sub-commits(26)
5f9f7f6copilot-swe-agent[bot]other file

Initial plan

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
5df0146copilot-swe-agent[bot]Culprit

Add max_iter guards to parsing loops and mmap support for .obj/.mtl loading

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
f2c657bcopilot-swe-agent[bot]Culprit

Rewrite parser from line-based to byte-stream-based with EOF guards

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
c57ed2ccopilot-swe-agent[bot]Culprit

Rewrite parser to byte-stream based with StreamReader for bounds-checked parsing

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
70ba4b3Syoyo Fujita

Merge remote-tracking branch 'origin/release' into copilot/harden-obj-mtl-parsing

07ba329Syoyo FujitaCulprit

Update tiny_obj_loader.h

GitHub Copilot·Co-author trailer (generic)
5ef0c48copilot-swe-agent[bot]Culprit

Integrate changes from release: Windows long paths, texcoord w-component, BOM in callback, test fixes

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
86edfe9Syoyo FujitaCulprit

Resolve merge conflicts between copilot/harden-obj-mtl-parsing and release

Claude Code·Co-author trailer
5b4f700Syoyo FujitaCulprit

Add clang-style parse error reporting with early return on failure

Claude Code·Co-author trailer
fbd2ed0Syoyo FujitaCulprit

Polish: hoist warning_context out of loop, fix no-op test

Claude Code·Co-author trailer
1fd9603copilot-swe-agent[bot]Culprit

Co-authored-by: syoyo <18676+syoyo@users.noreply.github.com>

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
7517033Syoyo FujitaCulprit

Update tiny_obj_loader.h

GitHub Copilot·Co-author trailer (generic)
502d5efSyoyo FujitaCulprit

Update tests/tester.cc

GitHub Copilot·Co-author trailer (generic)
ecc124ecopilot-swe-agent[bot]Culprit

Fix sr_parseTagTriple slash-delimited count parsing and add regression assertions

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
02c350ccopilot-swe-agent[bot]Culprit

Fix high/medium review findings: complete attrib reset, usemtl delimiter check, remove duplicate windows.h and dead errs...

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
ea9bf10copilot-swe-agent[bot]Culprit

Address low severity review items: document read_token, unify line_num naming, extract sr_skipTagField helper, refactor ...

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
b62d3bacopilot-swe-agent[bot]Culprit

Harden MappedFile with is_mapped flag to prevent unmapping string literals

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
7dde60acopilot-swe-agent[bot]other file

Run GPT-5.3-Codex comprehensive review

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
496cd28copilot-swe-agent[bot]other file

Remove accidental CTest artifact and ignore Testing/Temporary

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
d5aac19copilot-swe-agent[bot]Culprit

Fix stream offset handling and add oversized stream guards/tests

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
9b6d594copilot-swe-agent[bot]Culprit

Final deep-review fixes for mtllib callback failure path

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
14e6a5acopilot-swe-agent[bot]Culprit

Stage-2 deep review fixes for mtllib empty tokens and mmap size guard parity

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
07d2c25copilot-swe-agent[bot]Culprit

Stage-3 deep review: preserve mtllib backslashes and harden stream size check

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
55a0f27copilot-swe-agent[bot]Culprit

Stage-4 review: fix callback usemtl parsing and harden int parsing

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
a736504copilot-swe-agent[bot]Culprit

Stage-5 review: harden size parsing and Windows mmap path

GitHub Copilot·Author emailGitHub Copilot·Committer emailGitHub Copilot·Author name
dd5bbd8Syoyo FujitaCulprit

Final polish: fix overflow guards, zero-length normalize, and minor inconsistencies

Claude Code·Co-author trailer

Tribunal Analysis

3 agents
CONFIRMEDlow
CONFIRMEDGPT-5.4
88%

The suspected commit introduced a new byte-stream parser and, with it, new StreamReader-based numeric parsing paths (`sr_parseReal` and related code) that call the existing `tryParseDouble`. In this commit, `tryParseDouble` is present in the vulnerable form and is actively used by the new parsing logic, making the heap-buffer-overflow reachable in the rewritten parser. The commit message itself shows later follow-up hardening for parsing/bounds issues, which is consistent with this large parser rewrite being the point where the vulnerable code path was introduced into the new implementation.

  • Commit f27721f3c9cd20af4d4eee789431b92d0e0c4477 rewrites OBJ/MTL parsing to a new StreamReader byte-stream implementation.
  • At this commit, `tiny_obj_loader.h` contains `tryParseDouble(const char *s, const char *s_end, double *result)` in the vulnerable form.
  • The same commit adds new callers `sr_parseReal(...)` that invoke `tryParseDouble(start, start + len, &val)`, making the vulnerable parser part of the new byte-stream parsing path.
  • The old pointer-based `parseReal` also calls `tryParseDouble`, but this commit newly wires the function into the rewritten parser that the commit introduces.
UNLIKELYClaude Opus 4.6
30%

Fallback verdict: Agent exhausted max turns without submitting a verdict.

UNLIKELYGemini 3.1 Pro
30%

Fallback verdict: Agent exhausted max turns without submitting a verdict.

Causality Analysisby osv+gemini-3.1-pro-preview
VulnerabilityHeap-buffer-overflow
Root CauseThe `tryParseDouble` function reads past the end of the input buffer when parsing malformed floating-point numbers, leading to a heap buffer overflow.
Pattern
Custom floating-point parsing loop without proper bounds checking on the input string buffer.
AI Signals(2)
Commit5df0146
Claude CodeCo-author trailerCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>95%
GitHub CopilotAuthor emailCopilot@users.noreply.github.com95%
Fix Commits(1)
References(1)