7.6high
picklescan - Remote Code Execution via Undetected cProfile.runctx in Pickle Files
- Severity
- 7.6high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.34% (higher than 29% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-9w88-8rmg-7g2pPYSEC-2026-247
Description
picklescan before 0.0.30 fails to detect cProfile.runctx function calls in pickle file reduce methods, allowing attackers to execute arbitrary code. Malicious pickle files bypass picklescan detection and execute remote code when loaded via pickle.load().
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| picklescan picklescan | before 0.0.30 Not affected: 0.0.30 | CVE List |
| picklescan (PyPI) | before 0.0.30 | GitHub Advisory Database, PyPA Advisory Database |
| mmaitre314 picklescan | before 0.0.30 | NVD |
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 | medium rating | |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
picklescan before 0.0.30 fails to detect cProfile.runctx function calls in pickle file reduce methods, allowing attackers to execute arbitrary code. Malicious pickle files bypass picklescan detection and execute remote code when loaded via pickle.load().
GitHub Advisory Database
Summary
Using cProfile.runctx function, which is a built-in python library function to execute remote pickle file.
Details
The attack payload executes in the following steps:
First, the attacker craft the payload by calling to cProfile.runctx function in reduce method Then 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.
PoC
import cProfile
class EvilCProfileRunctx:
def __reduce__(self):
# cProfile.runctx(cmd, globals, locals) -> exec(cmd, ...)
return cProfile.runctx, ("__import__('os').system('whoami')", None, None)
Impact
Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. 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.
Corresponding
NVD (es)
picklescan anterior a 0.0.30 no detecta llamadas a la función cProfile.runctx en los métodos reduce de archivos pickle, permitiendo a los atacantes ejecutar código arbitrario. Archivos pickle maliciosos eluden la detección de picklescan y ejecutan código remoto cuando se cargan a través de pickle.load().
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-71378 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9w88-8rmg-7g2p changed 2026-09-11 | CC-BY-4.0 |
| NVD | CVE-2025-71378 changed 2026-10-12 | Public domain |
| PyPA Advisory Database | PYSEC-2026-247 changed 2026-06-27 | CC-BY-4.0 |