Security context

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

LostRuins/koboldcpp
concedo @ 0c163a9
92
Fixes
0
CVEs
CRITICAL
Peak severity
27.0%
Coverage
Highlights
Denial of Service: 53 prior fixes. Scrutinize any change in this area.
src/llama-context.cpp: most-fixed (9 issues). Treat as high-risk during review.
28 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.

Memory Corruption: The RPC backend was vulnerable to remote code execution due to missing destination buffer size verification during tensor copy operations. This could allow a remote attacker to execute arbitrary code via the server interface.
Arbitrary Code Execution: Deserializing untrusted model weights using standard PyTorch loading allowed arbitrary pickle execution. Forcing weights-only loading blocks the execution of malicious payload scripts embedded in model files.
Path Traversal: The server component allowed arbitrary local file read/write access when resolving user-supplied file:// URLs or saving/restoring states. This was mitigated by implementing directory-based restrictions and canonicalization checks.