Cyber Resilience

CVE-2025-1550

Keras 3.0.0 – 3.8.0

Public PoC
Published
11 March 2025
Modified
31 July 2025
Patch / advisory
CVSS Score v4 7.3
Click a component to see what it means
Raw vectorCVSS: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
EPSS Score 0.026 84th percentile
Risk Priority 55 floored blend · peak EPSS

Summary

CVE-2025-1550 is a high-severity Code Injection (CWE-94) vulnerability in Keras Keras. Its CVSS base score is 7.3 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked in the top 16% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as Deep Learning Frameworks; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

The vulnerability affects the Keras deep learning framework's Model.load_model function. A manually crafted malicious .keras archive can bypass the safe_mode=True setting by embedding attacker-controlled entries in its config.json file, causing arbitrary Python modules and functions to be imported and executed during deserialization.

An attacker with the ability to supply a model file to a victim application or user can achieve remote or local code execution with the privileges of the loading process. The attack requires the target to invoke load_model on the tainted archive and succeeds even when the documented safe-mode protections are enabled, corresponding to the observed CVSS 7.3 rating that includes local access and limited user interaction.

A fix has been proposed in Keras pull request 20751. The associated technical write-up at towerofhanoi.it details the config.json manipulation technique. The issue is relevant to machine-learning pipelines that load untrusted models; the EPSS score has remained flat at 0.0988 with no observed increase after disclosure.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

be loaded and executed during model loading.

CWE(s)

AI Security AnalysisAI

AI Category
Deep Learning Frameworks
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: keras

Related Threats

MITRE ATT&CK Enterprise Techniques

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.005 Visual Basic Execution
Adversaries may abuse Visual Basic (VB) for execution.
T1059.006 Python Execution
Adversaries may abuse Python commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-3660Same product: Keras Keras
CVE-2025-9905Same product: Keras Keras
CVE-2025-8747Same product: Keras Keras
CVE-2025-9906Same product: Keras Keras
CVE-2026-12481Same product: Keras Keras
CVE-2026-11816Same product: Keras Keras
CVE-2026-12482Same product: Keras Keras
CVE-2026-1669Same product: Keras Keras
CVE-2026-0897Same product: Keras Keras
CVE-2024-55459Same product: Keras Keras

Affected Assets

keras
keras
3.0.0 — 3.8.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Least privilege limits the damage an injected code fragment can perform once executed.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

none

Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.

References