Security context

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

huggingface/text-generation-inference
main @ b4adbf2
13
Fixes
0
CVEs
HIGH
Peak severity
72.7%
Coverage
Highlights
Denial of Service: 11 prior fixes. Scrutinize any change in this area.
router/src/validation.rs: most-fixed (4 issues). 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.

Denial of Service: The validation layer is highly prone to resource exhaustion and panics. Examples include unhandled tokenizer encoding errors causing panics (unwrap), inverted input truncation logic leading to exhaustion, and unconstrained image resizing scaling issues. Ensuring strict error boundaries and size limits is critical.
Auth Bypass: Crucial inference and tokenization routes were previously exposed without API key validation, risking unauthorized access to high-compute generation and chat endpoints. Strict middleware coverage across all current and new endpoints must be enforced.
Denial of Service: Unconstrained external payloads, such as fetched images without size-limit checks and token-encoding requests with excessive input sizes, pose a severe threat of memory exhaustion and denial of service.