{"id":"CVE-2025-71344","aliases":["CVE-2025-71344","GHSA-xp4f-hrf8-rxw7","PYSEC-2026-1792"],"related":[],"kind":"vulnerability","state":"published","title":"picklescan - Arbitrary Code Execution via Undetected ensurepip._run_pip Function","summary":"picklescan before 0.0.30 (affected versions 0.0.26 and earlier) fails to detect the ensurepip._run_pip built-in function when scanning pickle files, allowing attackers to execute arbitrary code. Malicious pickle files embedding ensurepip._run_pip calls in __reduce__ methods bypass picklescan detection and achieve remote code execution upon pickle.load() invocation.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"picklescan before 0.0.30 (affected versions 0.0.26 and earlier) fails to detect the ensurepip._run_pip built-in function when scanning pickle files, allowing attackers to execute arbitrary code. Malicious pickle files embedding ensurepip._run_pip calls in __reduce__ methods bypass picklescan detection and achieve remote code execution upon pickle.load() invocation.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nUsing ensurepip._run_pip function, which is a built-in python 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 ensurepip._run_pip 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```\nfrom ensurepip import _run_pip\n\nclass EvilEnsurepipRunpip:\n    def __reduce__(self):\n        payload = \"[(__import__('os').system('whoami'),)]\"\n        return _run_pip, (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 antes de la versión 0.0.30 (versiones afectadas 0.0.26 y anteriores) no detecta la función incorporada ensurepip._run_pip al escanear archivos pickle, permitiendo a los atacantes ejecutar código arbitrario. Los archivos pickle maliciosos que incrustan llamadas a ensurepip._run_pip en métodos __reduce__ eluden la detección de picklescan y logran la ejecución remota de código al invocar pickle.load().","source":"nvd"}],"published":"2025-08-26T21:34:37.000Z","modified":"2026-10-12T22:10:00.247Z","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"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.0.30","status":"affected"},{"type":"semver","version":"0.0.30","status":"unaffected"}],"vendor":"picklescan","product":"picklescan","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.30"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.30"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"pysec"}],"references":[{"url":"https://github.com/mmaitre314/picklescan/security/advisories/GHSA-xp4f-hrf8-rxw7","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/picklescan-arbitrary-code-execution-via-undetected-ensurepip-run-pip-function","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71344","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mmaitre314/picklescan/commit/1931c2d04eaca8d20597705ff39cab78ba364e4b","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-xp4f-hrf8-rxw7","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mmaitre314/picklescan","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2026-1792.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/picklescan","tags":["package","web"],"sources":["ghsa","pysec"]}],"credits":["FredericDT"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-23T18:22:22.820Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71344","url":"https://www.cve.org/CVERecord?id=CVE-2025-71344","licence":"CVE Terms of Use","modified":"2026-06-23T18:24:06.958Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xp4f-hrf8-rxw7","url":"https://github.com/advisories/GHSA-xp4f-hrf8-rxw7","licence":"CC-BY-4.0","modified":"2026-07-21T19:30:30.369Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71344","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71344","licence":"Public domain","modified":"2026-10-12T22:10:00.247Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1792","url":"https://osv.dev/vulnerability/PYSEC-2026-1792","licence":"CC-BY-4.0","modified":"2026-07-07T17:48:02.398Z"}],"updatedAt":"2026-11-25T22:59:12.339Z","epss":{"score":0.00467,"percentile":0.42109,"date":"2026-12-01T12:00:22.000Z"}}