CVE-2025-71365
JSON

7.6high

picklescan - Arbitrary Code Execution via numpy.f2py.crackfortran.myeval Detection Bypass

Severity
7.6high CVSS:4.0 by VulnCheck
Exploit likelihood
0.38% (higher than 34% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-3329-ghmp-jmv5PYSEC-2026-4131

Description

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.

Affected

Product or packageVersionsReported by
picklescan picklescanbefore 0.0.33
Not affected: 0.0.33
CVE List
picklescan (PyPI)before 0.0.33GitHub Advisory Database, PyPA Advisory Database

All scores

VulnCheck7.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
VulnCheck8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
PyPA Advisory Database8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-94CWE-502

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Summary

Picklescan uses numpy.f2py.crackfortran.myeval, which is a function in numpy to execute remote pickle files.

Details

The attack payload executes in the following steps:

  • First, the attacker crafts the payload by calling the numpy.f2py.crackfortran.myeval function in its reduce method
  • 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.
PoC
class RCE:
    def __reduce__(self):
        from numpy.f2py.crackfortran import myeval
        return (myeval, ("os.system('ls')",))
Impact

Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded. Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.

Report by

Pinji Chen (cpj24@mails.tsinghua.edu.cn) from the NISL lab (https://netsec.ccert.edu.cn/about) at Tsinghua University, Guanheng Liu (coolwind326@gmail.com).

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-71365 changed 2026-06-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-3329-ghmp-jmv5 changed 2026-10-01CC-BY-4.0
NVDCVE-2025-71365 changed 2026-10-12Public domain
PyPA Advisory DatabasePYSEC-2026-4131 changed 2026-10-01CC-BY-4.0