Highlights
Remote Code Execution: 3 prior fixes. Scrutinize any change in this area.
method_comparison/app.py: most-fixed (1 issue). Treat as high-risk during review.
3 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.
Remote Code Execution: User-supplied queries were directly evaluated using pandas.DataFrame.query, allowing arbitrary python code execution. This required introducing an AST-based safe evaluator to sanitize inputs.
Remote Code Execution: Malicious adapter configurations could trigger arbitrary module execution through untrusted package imports. This was mitigated by introducing an import allowlist in the AutoPeftModel initialization path.
Remote Code Execution: Allowing untrusted configurations to pass the trust_remote_code parameter to AutoTokenizer.from_pretrained can lead to arbitrary code execution when loading remote tokenizers. The fix explicitly pops this parameter from the tokenizer arguments.