Code Injection Affecting keras package, versions [,2.13.1rc0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th 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 Learn

Learn about Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-KERAS-6615954
  • published17 Apr 2024
  • disclosed16 Apr 2024
  • creditJeffrey Havrilla, Allen Householder, Andrew Kompanek, Ben Koo

Introduced: 16 Apr 2024

CVE-2024-3660  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade keras to version 2.13.1rc0 or higher.

Overview

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

Affected versions of this package are vulnerable to Code Injection due to improper user input sanitization through the Lambda layer, allowing a developer to add arbitrary Python code to a model in the form of a lambda function. An attacker could use this feature to trojanize a popular model, save it, and redistribute it, tainting the supply chain of dependent AI/ML applications. In addition, exploiting this vulnerability allows arbitrary code to be executed with the same permissions as the application.

Note

If running pre-2.13 applications in a sandbox, ensure no assets of value are in scope of the running application to minimize the potential for data exfiltration.

CVSS Scores

version 3.1