Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

microsoft/onnxruntime-genai
main @ af5de52
25
Fixes
0
CVEs
HIGH
Peak severity
8.3%
Coverage
Highlights
Out-of-Bounds Read: 5 prior fixes. Scrutinize any change in this area.
src/generators.cpp: most-fixed (4 issues). Treat as high-risk during review.
20 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Out-of-Bounds Read/Write: Multiple fixes target unchecked indices (eos_token_id, top_k, num_return_sequences) in beam search and sampling, leading to heap OOB access and writes reachable from malicious configs.
Out-of-Bounds Read: Speech and multimodal processors repeatedly failed to validate tensor shapes/ranks before indexing (GetShape, GetTensorData), causing OOB reads across nemotron_speech, parakeet, whisper, multi_modal, and marian.
Path Traversal: Config-driven model/processor loading and custom ops library loading both lacked path validation, allowing directory escape via absolute or '..' paths.