{"id":"CVE-2025-71348","aliases":["CVE-2025-71348","GHSA-vv6j-3g6g-2pvj","PYSEC-2026-245"],"related":[],"kind":"vulnerability","state":"published","title":"picklescan - Arbitrary Code Execution via torch.utils._config_module.load_config Bypass","summary":"picklescan before 0.0.28 fails to detect malicious pickle files that invoke torch.utils._config_module.load_config function within reduce methods. Attackers can craft pickle files embedding arbitrary code that evades detection but executes during pickle.load, enabling remote code execution in supply chain attacks.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"picklescan before 0.0.28 fails to detect malicious pickle files that invoke torch.utils._config_module.load_config function within reduce methods. Attackers can craft pickle files embedding arbitrary code that evades detection but executes during pickle.load, enabling remote code execution in supply chain attacks.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nUsing torch.utils._config_module.load_config 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 crafts the payload by calling the torch.utils._config_module.load_config function via the __reduce__ method. Then the victim checks whether the pickle file is safe using the Picklescan library. Because the library fails to detect any dangerous functions, the victim decides to pickle.load() this malicious file, leading to remote code execution.\n\n### PoC\n\n```\nimport pickle\nfrom torch.utils._config_module import ConfigModule\n\nclass Evil:\n    def __reduce__(self):\n        return (os.system, ('whoami',))\n\nclass EvilTorchUtilsConfigModuleLoadConfig:\n    def __reduce__(self):\n        evil_payload = pickle.dumps(Evil())\n        return ConfigModule.load_config, (None, evil_payload)\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 invocan la función torch.utils._config_module.load_config dentro de los métodos reduce. Los atacantes pueden crear archivos pickle que incrustan código arbitrario que evade la detección pero se ejecuta durante pickle.load, posibilitando la ejecución remota de código en ataques a la cadena de suministro.","source":"nvd"}],"published":"2025-08-22T16:58:14.000Z","modified":"2026-11-08T14:00:28.950Z","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":"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":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-345","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"},{"ranges":[{"status":"affected","fixed":"0.0.28"}],"vendor":"mmaitre314","product":"picklescan","cpe":"cpe:2.3:a:mmaitre314:picklescan:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.28"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"pysec"}],"references":[{"url":"https://github.com/mmaitre314/picklescan/security/advisories/GHSA-vv6j-3g6g-2pvj","tags":["evidence","exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/picklescan-arbitrary-code-execution-via-torch-utils-config-module-load-config-bypass","tags":["advisory","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71348","tags":["advisory"],"sources":["ghsa"]},{"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"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2026-245.yaml","tags":["web"],"sources":["ghsa"]}],"credits":["FredericDT"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-22T19:05:34.765Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71348","url":"https://www.cve.org/CVERecord?id=CVE-2025-71348","licence":"CVE Terms of Use","modified":"2026-11-08T14:00:28.950Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vv6j-3g6g-2pvj","url":"https://github.com/advisories/GHSA-vv6j-3g6g-2pvj","licence":"CC-BY-4.0","modified":"2026-09-11T19:45:09.010Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71348","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71348","licence":"Public domain","modified":"2026-10-12T22:10:00.247Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-245","url":"https://osv.dev/vulnerability/PYSEC-2026-245","licence":"CC-BY-4.0","modified":"2026-06-27T11:15:05.178Z"}],"updatedAt":"2026-11-25T22:59:12.335Z","epss":{"score":0.00397,"percentile":0.36074,"date":"2026-12-01T12:00:22.000Z"}}