Security context

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

microsoft/qlib
main @ d5379c5
5
Fixes
1
CVEs
HIGH
Peak severity
Highlights
Deserialization of Untrusted Data: 2 prior fixes. Scrutinize any change in this area.
qlib/utils/pickle_utils.py: most-fixed (2 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.

Deserialization of Untrusted Data: The project relied on standard, unrestricted `pickle.load` operations. If malicious payload files are supplied, this can lead directly to remote arbitrary code execution, requiring the implementation of a custom whitelisting `RestrictedUnpickler` to neutralize the hazard.
Command Injection: Unsanitized inputs, such as the NFS provider URI, were passed directly to shell execution commands like `os.system` and unparameterized `subprocess.Popen` calls, allowing attackers to execute arbitrary system commands.
Insecure Deserialization: Using pickle to serialize client/server communication data opens up deserialization vectors. This was addressed by migrating client request serialization entirely from pickle to safe JSON serialization.