7.6high
picklescan - Arbitrary Code Execution via Unsafe Deserialization in numpy.f2py.crackfortran
- Severity
- 7.6high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-r8g5-cgf2-4m4m
Description
picklescan before 0.0.33 fails to detect unsafe deserialization when numpy.f2py.crackfortran functions call eval on arbitrary strings. Attackers can embed malicious code in pickle files that executes when loaded from untrusted sources.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| picklescan picklescan | before 0.0.33 Not affected: 0.0.33 | CVE List |
| picklescan (PyPI) | before 0.0.33 | GitHub Advisory Database |
All scores
| VulnCheck | 7.6high CVSS:4.0 | 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 |
| VulnCheck | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
picklescan before 0.0.33 fails to detect unsafe deserialization when numpy.f2py.crackfortran functions call eval on arbitrary strings. Attackers can embed malicious code in pickle files that executes when loaded from untrusted sources.
GitHub Advisory Database
Summary
An unsafe deserialization vulnerability allows an attacker to execute arbitrary code on the host when loading a malicious pickle payload from an untrusted source.
Details
The numpy.f2py.crackfortran module exposes many functions that call eval on arbitrary strings of values. This is the case for getlincoef and _eval_length. This list is probably not exhaustive.
According to https://numpy.org/doc/stable/reference/security.html#advice-for-using-numpy-on-untrusted-data, the whole numpy.f2py should be considered unsafe when loading a pickle.
PoC
from numpy.f2py.crackfortran import getlincoef
class EvilClass:
def __reduce__(self):
payload = "__import__('os').system('echo \"successful attack\"')"
return getlincoef, (payload, [])
Impact
Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files from untrusted sources.
What is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.
Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.
Note
The problem was originally reported to the joblib project, but this was deemed unrelated to joblib itself. However, I checked that picklescan was indeed vulnerable.
NVD (es)
picklescan anterior a la versión 0.0.33 no logra detectar la deserialización insegura cuando las funciones numpy.f2py.crackfortran llaman a eval sobre cadenas arbitrarias. Los atacantes pueden incrustar código malicioso en archivos pickle que se ejecuta al cargarse desde fuentes no confiables.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-71362 changed 2026-07-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r8g5-cgf2-4m4m changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2025-71362 changed 2026-10-12 | Public domain |