p PatchFirst

CVE-2025-9905

CVE-2025-9905 · Arbitary Code execution in Keras load_model()

Esta página presenta datos de fuentes públicas de vulnerabilidades. Consulta el aviso original antes de actualizar.

The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. One can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives. Note that the .h5/.hdf5 format is a legacy format supported by Keras 3 for backwards compatibility.

CVSS 7.3 · Alta · EPSS 0,2% · Corrección disponible

Publicación
Actualización

Pila tecnológica: system · python

Productos y versiones afectados

  • keras

    Versiones
    • ≥ 3.0.0, ≤ 3.11.2: Afectada (semver)

    Sin corrección publicada

  • keras Debian:11

    Versiones
    • 2.3.1+dfsg-3
    • 2.3.1+dfsg2-1
    Intervalos de versiones afectados
    • ECOSYSTEM: (−∞, +∞)

    Sin corrección publicada

  • keras PyPI

    Versiones
    • 3.0.0
    • 3.0.1
    • 3.0.2
    • 3.0.3
    • 3.0.4
    • 3.0.5
    • 3.1.0
    • 3.1.1
    • 3.10.0
    • 3.11.0
    • 3.11.1
    • 3.11.2
    • 3.2.0
    • 3.2.1
    • 3.3.0
    • 3.3.1
    • 3.3.2
    • 3.3.3
    • 3.4.0
    • 3.4.1
    • 3.5.0
    • 3.6.0
    • 3.7.0
    • 3.8.0
    • 3.9.0
    • 3.9.1
    • 3.9.2
    Intervalos de versiones afectados
    • ECOSYSTEM: ≥ 3.0.0, < 3.11.3

    Actualiza a 3.11.3

  • keras Ubuntu:18.04:LTS

    Versiones
    • 1.0.7-2
    • 2.1.1-1
    Intervalos de versiones afectados
    • ECOSYSTEM: (−∞, +∞)

    Sin corrección publicada

  • keras Ubuntu:20.04:LTS

    Versiones
    • 2.2.4-1
    Intervalos de versiones afectados
    • ECOSYSTEM: (−∞, +∞)

    Sin corrección publicada

Fuentes originales

Comprueba tu servidor →