p PatchFirst

CVE-2025-9905

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

Cette page présente des faits issus de sources publiques. Consultez l’avis original avant toute mise à jour.

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 · Élevée · EPSS 0,2% · Correctif disponible

Publication
Mise à jour

Pile logicielle: system · python

Produits et versions concernés

  • keras

    Versions du logiciel
    • ≥ 3.0.0, ≤ 3.11.2: Concernée (semver)

    Aucun correctif publié

  • keras Debian:11

    Versions du logiciel
    • 2.3.1+dfsg-3
    • 2.3.1+dfsg2-1
    Plages de versions concernées
    • ECOSYSTEM: (−∞, +∞)

    Aucun correctif publié

  • keras PyPI

    Versions du logiciel
    • 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
    Plages de versions concernées
    • ECOSYSTEM: ≥ 3.0.0, < 3.11.3

    Mettez à jour vers 3.11.3

  • keras Ubuntu:18.04:LTS

    Versions du logiciel
    • 1.0.7-2
    • 2.1.1-1
    Plages de versions concernées
    • ECOSYSTEM: (−∞, +∞)

    Aucun correctif publié

  • keras Ubuntu:20.04:LTS

    Versions du logiciel
    • 2.2.4-1
    Plages de versions concernées
    • ECOSYSTEM: (−∞, +∞)

    Aucun correctif publié

Sources originales

Vérifiez votre serveur →