Security context

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

kvcache-ai/ktransformers
main @ cb9f47d
1
Fixes
1
CVEs
CRITICAL
Peak severity
100.0%
Coverage
Highlights
Memory Safety: 1 prior fix. Scrutinize any change in this area.
kt-kernel: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

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

Insecure Deserialization: The use of pickle.loads() on unvalidated payloads received over ZMQ ROUTER sockets in the balance_serve backend mode permits remote attackers to execute arbitrary code within the privileges of the ktransformers process. This represents a classic, highly exploitable deserialization flow that requires immediate deprecation of pickle in favor of secure formats.
Memory Safety: A use-after-free vulnerability existed in the AVX2 MXFP4 MoE kernel because memory-mapped weights were referenced without ownership, potentially leading to crashes or code execution. The mitigation requires copying weights into internally managed, owned memory buffers to ensure lifetime safety during kernel execution.