{"id":"CVE-2025-71369","aliases":["CVE-2025-71369","GHSA-h3qp-7fh3-f8h4"],"related":[],"kind":"vulnerability","state":"published","title":"picklescan - Unsafe Deserialization via torch.utils.data.datapipes.utils.decoder.basichandlers","summary":"picklescan before 0.0.28 fails to detect malicious pickle files that use torch.utils.data.datapipes.utils.decoder.basichandlers in reduce methods, allowing attackers to bypass safety checks. Remote attackers can embed undetected malicious code in pickle files that executes during deserialization, enabling remote code execution.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"picklescan before 0.0.28 fails to detect malicious pickle files that use torch.utils.data.datapipes.utils.decoder.basichandlers in reduce methods, allowing attackers to bypass safety checks. Remote attackers can embed undetected malicious code in pickle files that executes during deserialization, enabling remote code execution.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nUsing torch.utils.data.datapipes.utils.decoder.basichandlers function, which is a pytorch library function to execute remote pickle file.\n\n### Details\n\nThe attack payload executes in the following steps:\n\nFirst, the attacker craft the payload by calling to torch.utils.data.datapipes.utils.decoder.basichandlers function in reduce method\nThen when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution.\n\n### PoC\n\n```\nimport torch.utils.data.datapipes.utils.decoder as decoder\n\nclass EvilTorchUtilsDataDatapipesDecoder:\n    def __reduce__(self):\n        extension = 'pickle'\n        class RCE:\n            def __reduce__(self):\n                return os.system, ('whoami',)\n        data = pickle.dumps(RCE())\n        return decoder.basichandlers, (extension, data)\n```\n\n### Impact\n\nWho is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models.\nWhat is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.\nSupply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\n\n### Corresponding\n\nhttps://github.com/FredericDT\nhttps://github.com/Qhaoduoyu","format":"markdown","source":"ghsa"},{"lang":"es","text":"picklescan anterior a la versión 0.0.28 no detecta archivos pickle maliciosos que utilizan torch.utils.data.datapipes.utils.decoder.basichandlers en los métodos reduce, lo que permite a los atacantes eludir las comprobaciones de seguridad. Los atacantes remotos pueden incrustar código malicioso no detectado en archivos pickle que se ejecuta durante la deserialización, lo que permite la ejecución remota de código.","source":"nvd"}],"published":"2025-08-22T16:57:59.000Z","modified":"2026-10-12T19:10:00.217Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.0.28","status":"affected"},{"type":"semver","version":"0.0.28","status":"unaffected"}],"vendor":"picklescan","product":"picklescan","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.28"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"ghsa"}],"references":[{"url":"https://github.com/mmaitre314/picklescan/security/advisories/GHSA-h3qp-7fh3-f8h4","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/picklescan-unsafe-deserialization-via-torch-utils-data-datapipes-utils-decoder-basichandlers","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/mmaitre314/picklescan/pull/47","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mmaitre314/picklescan/commit/7f994d62084fe43f1cffdef2f9bae6923344ef53","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mmaitre314/picklescan","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/mmaitre314/picklescan/releases/tag/v0.0.28","tags":["web"],"sources":["ghsa"]}],"credits":["FredericDT"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-06T16:26:30.366Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71369","url":"https://www.cve.org/CVERecord?id=CVE-2025-71369","licence":"CVE Terms of Use","modified":"2026-07-06T16:26:52.279Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h3qp-7fh3-f8h4","url":"https://github.com/advisories/GHSA-h3qp-7fh3-f8h4","licence":"CC-BY-4.0","modified":"2026-07-08T07:23:54.584Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71369","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71369","licence":"Public domain","modified":"2026-10-12T19:10:00.217Z"}],"updatedAt":"2026-11-25T22:59:12.379Z","epss":{"score":0.00564,"percentile":0.48255,"date":"2026-12-01T12:00:22.000Z"}}