{"id":2653,"cve":"CVE-2026-57845","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-57845\/","cwe":"CWE-502","cwe_number":502,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/502","cvss_score":8.7,"published":"2026-10-23","owasp":"A08 Software and Data Integrity Failures","odc":"Timing\/Serialization","cdc":"Serialization Issues","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Insecure deserialization in Hugging Face Datasets lets malicious pickles run arbitrary Python code.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-57845\/","description":"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.","solution":"Upgrade the\u202fhuggingface\u2011datasets\u202fpackage to version\u202f5.2.0\u202for later, which removes the vulnerable pandas builder and fixes the insecure deserialization issue.","affected_component":"datasets","fixed_by_upgrading":true,"vulnerable_code":"import pandas as pd\n\ndef load_pandas_dataset(file_path: str):\n    # VULNERABLE: directly deserializes untrusted pickle\n    df = pd.read_pickle(file_path)\n    return df\n","patched_code":"import pandas as pd\n\ndef load_pandas_dataset(file_path: str):\n    # FIX: reject pickle files and use safe CSV parsing\n    if file_path.lower().endswith(('.pkl', '.pickle')):\n        raise ValueError(\"Pickle files are not allowed\")\n    df = pd.read_csv(file_path)\n    return df\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"huggingface\/datasets","commit_url":"https:\/\/github.com\/huggingface\/datasets\/pull\/8879","commit_subject":"Fix pickle RCE in pandas dataset builder (CVE-2026-57845)","units":[{"file":"src\/datasets\/packaged_modules\/pandas\/pandas.py","function":null},{"file":"src\/datasets\/packaged_modules\/pandas\/pandas.py","function":"Pandas._generate_tables"}]}],"references":null}