{"id":"CVE-2025-71365","aliases":["CVE-2025-71365","GHSA-3329-ghmp-jmv5","PYSEC-2026-4131"],"related":[],"kind":"vulnerability","state":"published","title":"picklescan - Arbitrary Code Execution via numpy.f2py.crackfortran.myeval Detection Bypass","summary":"picklescan before 0.0.33 fails to detect malicious pickle files that invoke numpy.f2py.crackfortran.myeval function through the reduce method. Attackers can craft malicious pickle files embedding arbitrary code that evades picklescan detection and executes remote code when loaded.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"picklescan before 0.0.33 fails to detect malicious pickle files that invoke numpy.f2py.crackfortran.myeval function through the reduce method. Attackers can craft malicious pickle files embedding arbitrary code that evades picklescan detection and executes remote code when loaded.","source":"cvelist"},{"lang":"en","text":"### Summary\nPicklescan uses numpy.f2py.crackfortran.myeval, which is a function in numpy to execute remote pickle files.\n\n### Details\nThe attack payload executes in the following steps:\n\n- First, the attacker crafts the payload by calling the numpy.f2py.crackfortran.myeval function in its reduce method\n- Then, when the victim checks whether the pickle file is safe by using the Picklescan library and this library doesn't detect any dangerous functions, they decide to use pickle.load() on this malicious pickle file, thus leading to remote code execution.\n\n### PoC\n```\nclass RCE:\n    def __reduce__(self):\n        from numpy.f2py.crackfortran import myeval\n        return (myeval, (\"os.system('ls')\",))\n```\n\n\n### Impact\nAny organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models.\nAttackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.\nAttackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\n\n### Report by\nPinji Chen (cpj24@mails.tsinghua.edu.cn) from the NISL lab (https://netsec.ccert.edu.cn/about) at Tsinghua University, Guanheng Liu (coolwind326@gmail.com).","format":"markdown","source":"ghsa"},{"lang":"es","text":"picklescan anterior a 0.0.33 no logra detectar archivos pickle maliciosos que invocan la función numpy.f2py.crackfortran.myeval a través del método reduce. Atacantes pueden elaborar archivos pickle maliciosos incrustando código arbitrario que evade la detección de picklescan y ejecuta código remoto cuando se carga.","source":"nvd"}],"published":"2025-12-29T20:04:09.000Z","modified":"2026-10-12T21:10:00.227Z","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":"PyPA Advisory Database","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":"PyPA Advisory Database","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"}],"cwes":["CWE-94","CWE-502"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.0.33","status":"affected"},{"type":"semver","version":"0.0.33","status":"unaffected"}],"vendor":"picklescan","product":"picklescan","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.33"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.33"}],"ecosystem":"PyPI","package":"picklescan","purl":"pkg:pypi/picklescan","source":"pysec"}],"references":[{"url":"https://github.com/mmaitre314/picklescan/security/advisories/GHSA-3329-ghmp-jmv5","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/picklescan-arbitrary-code-execution-via-numpy-f2py-crackfortran-myeval-detection-bypass","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71365","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mmaitre314/picklescan/pull/53","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/mmaitre314/picklescan","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/picklescan","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3329-ghmp-jmv5","tags":["advisory"],"sources":["pysec"]}],"credits":["CoolwindHF"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-06-23T14:31:45.381Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71365","url":"https://www.cve.org/CVERecord?id=CVE-2025-71365","licence":"CVE Terms of Use","modified":"2026-06-23T14:32:10.117Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3329-ghmp-jmv5","url":"https://github.com/advisories/GHSA-3329-ghmp-jmv5","licence":"CC-BY-4.0","modified":"2026-10-01T17:56:09.108Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71365","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71365","licence":"Public domain","modified":"2026-10-12T21:10:00.227Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4131","url":"https://osv.dev/vulnerability/PYSEC-2026-4131","licence":"CC-BY-4.0","modified":"2026-10-01T17:45:13.656Z"}],"updatedAt":"2026-11-25T22:59:12.341Z","epss":{"score":0.0038,"percentile":0.34096,"date":"2026-12-01T12:00:22.000Z"}}