CVE-2025-1550: Arbitrary Code Execution via Crafted Keras Config for Model Loading

Published Mar 11, 2025
·
Updated

Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-48g7-3x6r-xfhp. This link is maintained to preserve external references.

Original Description

The Keras Model.loadmodel function permits arbitrary code execution, even with safemode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.

Other sources

Impact

The Keras Model.loadmodel function permits arbitrary code execution, even with safemode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.

Patches

This problem is fixed starting with version 3.9.

Workarounds

Only load models from trusted sources and model archives created with Keras.

References

- https://www.cve.org/cverecord?id=CVE-2025-1550 - https://github.com/keras-team/keras/pull/20751

GitHub

Affected Software

4 affected componentsFixes available
Keras keras
pip/keras>=3.0.0<3.9.0
3.9.0
pip/keras<3.9.0
3.9.0
Keras keras>=3.0.0<3.8.0

Event History

Mar 11, 2025
CVE Published
via MITRE·08:12 AM
Data Sourced
via MITRE·08:12 AM
DescriptionWeakness
Data Sourced
via NVD·09:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 AM
RemedyAffected Software
Advisory Published
via GitHub·09:30 AM
Withdrawn
via GitHub·08:07 PM
Jul 16, 2025
Exploit Published
12:00 AM
Known Exploited
10:45 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-1550?

CVE-2025-1550 is classified as a high severity vulnerability due to its potential for arbitrary code execution.

2

How do I fix CVE-2025-1550?

To fix CVE-2025-1550, update to the latest version of Keras that addresses this vulnerability.

3

What impact does CVE-2025-1550 have on Keras applications?

CVE-2025-1550 can allow an attacker to execute arbitrary Python code within Keras applications, compromising the integrity and security of the environment.

4

Is safe_mode effective against CVE-2025-1550?

No, safe_mode is ineffective in mitigating CVE-2025-1550 as the vulnerability can bypass it through malicious .keras archives.

5

Who is affected by CVE-2025-1550?

Any user or application that utilizes the Keras Model.load_model function is potentially affected by CVE-2025-1550.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203