Every CVE Search/ Get API key

CVE-2025-1550

Arbitrary Code Execution via Crafted Keras Config for Model Loading

7.3 HighPublic exploitFix available

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Active

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.60%Up 2.6 points since Mar 12, 2025
90%50%10%1%

What each source reports

CVE List Score used 7.3

Arbitrary Code Execution via Crafted Keras Config for Model Loading

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
CVE-2025-1550
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Weakness
CWE-94
Updated
2026-11-02
EUVDEUVD-2025-7406 7.3

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
EUVD-2025-7406
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-48g7-3x6r-xfhp 7.3

Arbitrary Code Execution via Crafted Keras Config for Model Loading

Impact

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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

Record
GHSA-48g7-3x6r-xfhp
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Weakness
CWE-94
Updated
2026-11-02
NVD 7.3

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
CVE-2025-1550
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSV 7.3

Arbitrary Code Execution via Crafted Keras Config for Model Loading

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
CVE-2025-1550
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-48g7-3x6r-xfhp 7.3

Arbitrary Code Execution via Crafted Keras Config for Model Loading

Impact

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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

Record
GHSA-48g7-3x6r-xfhp
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Weakness
CWE-94
Updated
2026-11-02
OSVPYSEC-2025-122 9.8

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
PYSEC-2025-122
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2025-1550 7.3

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
UBUNTU-CVE-2025-1550
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-58360 No score

CVE-2025-1550 affecting package keras for versions less than 3.3.3-2

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=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.

Record
AZL-58360
Updated
2026-11-05

Affected products

Affected packages

Affected packages
PackageAffectedFixed
keras
PyPI
3.0.0 up to 3.9.0
3.9.0
keras
Azure Linux:3
before 3.3.3-2
3.3.3-2
keras
PyPI
3.0.0 up to 3.9.0, plus listed versions
3.0.13.0.23.0.33.0.43.0.5
Show 14 moreShow less
3.1.03.1.13.2.03.2.13.3.03.3.13.3.23.3.33.4.03.4.13.5.03.6.03.7.03.8.0
3.9.0
keras
PyPI
3.0.0 up to 3.8.0, plus listed versions
3.0.13.0.23.0.33.0.43.0.5
Show 13 moreShow less
3.1.03.1.13.2.03.2.13.3.03.3.13.3.23.3.33.4.03.4.13.5.03.6.03.7.0
3.8.0
keras
Ubuntu:18.04:LTS
All versions, plus listed versions
1.0.7-22.1.1-1
None known
keras
Ubuntu:20.04:LTS
All versions, plus listed versions
2.2.4-1
None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
Exploit-DBKeras 2.15 - Remote Code Execution (RCE)2025-07-16
PoC in GitHubChCh0i/cve-2025-15502025-10-24

History

History
RecordedChangedSources
factsOSV
first indexedCVE List, EUVD, Exploit-DB, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-1550 is a high vulnerability (CVSS 7.3) in Google Keras, published March 11, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.60%, the 85th percentile. Fixed in keras 3.9.0.

References

Show 7 moreShow less
MoveEnter Open