CVE-2026-57845: HF Datasets: pickle deserialization RCE via pandas builder
HIGHHugging Face Datasets through 5.1.0 unsafely deserializes pickle files in its deprecated pandas builder, so loading an attacker-supplied dataset with datasets.load_dataset("pandas", data_files=...) runs arbitrary Python code with the victim process's privileges. The CVSS 8.8 score reflects network delivery, low complexity and no privileges, with the only barrier being that a user or pipeline must load the malicious file. No EPSS score, KEV listing or SSVC decision exists yet, but a public proof-of-concept repository is referenced and the technique (a __reduce__ payload) is trivial, so weaponization risk is real even though no scanner template is available. Datasets sits at the center of training and evaluation pipelines that often hold cloud credentials, GPUs and proprietary data, so a single compromised load can become a pivot into ML infrastructure. Upgrade past the fixed release referenced in huggingface/datasets PR 8879, stop using the "pandas" builder on any non-trusted data, and audit pipelines for pickle-backed dataset sources.
What is the risk?
High. Exploitation needs no privileges and low complexity, but requires user interaction (loading a malicious dataset). Public PoC material is referenced, EPSS is not yet available and there is no KEV listing or known in-the-wild exploitation. Exposure is highest in organizations that pull community datasets from Hugging Face Hub or shared storage, or accept user-supplied datasets in automated pipelines. Impact is full compromise of confidentiality, integrity and availability of the process running the load.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| HF Datasets | pip | — | No patch |
Do you use HF Datasets? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade Hugging Face Datasets to a version containing the fix from huggingface/datasets PR 8879 once released, or apply the patch. 2) Do not use the deprecated "pandas" packaged builder; convert data to safe formats such as Parquet, CSV, JSON or Arrow. 3) Only load datasets from trusted, pinned and hash-verified sources; pin revisions on Hub datasets. 4) Run data loading in sandboxed, least-privilege containers with no ambient cloud credentials and restricted egress. 5) Scan pickle files with picklescan or fickling before use. 6) Detect by grepping code and notebooks for load_dataset("pandas"...) and monitoring for unexpected child processes or outbound connections from training jobs.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-57845?
Hugging Face Datasets through 5.1.0 unsafely deserializes pickle files in its deprecated pandas builder, so loading an attacker-supplied dataset with datasets.load_dataset("pandas", data_files=...) runs arbitrary Python code with the victim process's privileges. The CVSS 8.8 score reflects network delivery, low complexity and no privileges, with the only barrier being that a user or pipeline must load the malicious file. No EPSS score, KEV listing or SSVC decision exists yet, but a public proof-of-concept repository is referenced and the technique (a __reduce__ payload) is trivial, so weaponization risk is real even though no scanner template is available. Datasets sits at the center of training and evaluation pipelines that often hold cloud credentials, GPUs and proprietary data, so a single compromised load can become a pivot into ML infrastructure. Upgrade past the fixed release referenced in huggingface/datasets PR 8879, stop using the "pandas" builder on any non-trusted data, and audit pipelines for pickle-backed dataset sources.
Is CVE-2026-57845 actively exploited?
No confirmed active exploitation of CVE-2026-57845 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-57845?
1) Upgrade Hugging Face Datasets to a version containing the fix from huggingface/datasets PR 8879 once released, or apply the patch. 2) Do not use the deprecated "pandas" packaged builder; convert data to safe formats such as Parquet, CSV, JSON or Arrow. 3) Only load datasets from trusted, pinned and hash-verified sources; pin revisions on Hub datasets. 4) Run data loading in sandboxed, least-privilege containers with no ambient cloud credentials and restricted egress. 5) Scan pickle files with picklescan or fickling before use. 6) Detect by grepping code and notebooks for load_dataset("pandas"...) and monitoring for unexpected child processes or outbound connections from training jobs.
What systems are affected by CVE-2026-57845?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, fine-tuning pipelines, model evaluation harnesses, data preparation / ETL pipelines, Jupyter notebook environments.
What is the CVSS score for CVE-2026-57845?
CVE-2026-57845 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.55%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.002DataAML.T0011.000Unsafe AI ArtifactsAML.T0019Publish Poisoned DatasetsAML.T0050Command and Scripting InterpreterCompliance Controls Affected
What are the technical details?
Original Advisory
Hugging Face Datasets through 5.1.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.
Exploitation Scenario
An attacker publishes a dataset repository on a public hub or shares a file on a collaboration drive containing a pickle with a __reduce__ payload, presented as a useful benchmark or fine-tuning dataset. A data scientist or automated pipeline follows a tutorial calling datasets.load_dataset("pandas", data_files="poisoned.pkl"). Pandas read_pickle deserializes the file and executes the payload, launching a reverse shell or stealing cloud keys and Hugging Face tokens from the training node. The attacker then moves laterally to the model registry, storage buckets and GPU cluster, and may tamper with models or datasets.
Weaknesses (CWE)
CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
Timeline
Related Vulnerabilities
CVE-2026-616679.9DIRAC: SQLi chained into eval() gives RCE
Same package: datasetsCVE-2026-500279.8mcp-memory-service: auth bypass on document API
Same package: datasetsCVE-2026-718519.0crypto-js: weak PRNG enables wallet key recovery
Same package: datasetsCVE-2026-551787.5GeoLens: IDOR leaks private datasets via AI metadata API
Same package: datasetsCVE-2026-650106.6Datasets: symlink following enables arbitrary file write
Same package: datasets