Improper Control of Dynamically-Managed Code Resources Affecting keras package, versions [,3.11.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.01% (1st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-KERAS-12927179
  • published19 Sept 2025
  • disclosed19 Sept 2025
  • creditGabriele Digregorio

Introduced: 19 Sep 2025

NewCVE-2025-9905  (opens in a new tab)
CWE-913  (opens in a new tab)

How to fix?

Upgrade keras to version 3.11.3 or higher.

Overview

keras is a Keras is a high-level neural networks API for Python..

Affected versions of this package are vulnerable to Improper Control of Dynamically-Managed Code Resources via the Model.load_model method. An attacker can execute arbitrary code by providing a specially crafted .h5 or .hdf5 model archive that leverages the Lambda layer feature to include pickled Python code, which is executed when the archive is loaded, even if safe_mode=True is set.

CVSS Base Scores

version 4.0
version 3.1