Hugging Face Datasets code execution in pandas pickle loading
huggingface datasets
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| huggingface datasets |
|
|
Original description
Hugging Face Datasets before 5.2.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by crafting a malicious pickle file loaded through the deprecated pandas packaged builder. Attackers can supply a pickle-backed dataset that is processed by Pandas._generate_tables via pandas.read_pickle() without validation, so when a victim calls datasets.load_dataset("pandas", data_files=...), the embedded __reduce__ payload executes code with the victim process's privileges.
From the CVE record · VulnCheck