Security context

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

tensorflow/text
master @ eb6b2c0
8
Fixes
0
CVEs
HIGH
Peak severity
28.6%
Coverage
Highlights
Out-of-bounds Read: 5 prior fixes. Scrutinize any change in this area.
tensorflow_text: most-fixed (1 issue). Treat as high-risk during review.
5 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: Trie lookups, token boundaries, and FlatBuffer indices lack adequate validation during decoding and detokenization. This allows malformed model files or inputs to trigger arbitrary out-of-bounds reads during inference.
Out-of-Bounds Read: Trie array lookups are susceptible to memory safety violations if input node IDs are not explicitly checked against boundary limits, allowing arbitrary index access.
Use After Free: String internal references (string_views) pointing to internal vocabularies can be invalidated during copy constructor operations, causing use-after-free vulnerabilities when calling tokenizers.