Documented Incident · INC-2025-1550 · Critical severity
Keras Model.load_model() safe_mode=True Bypass via Crafted config.json
CVE-2025-1550 (published March 11, 2025) revealed an arbitrary code execution bypass in Keras's `Model.load_model()` even when `safe_mode=True` was explicitly enforced. Attackers could modify the `config.json` manifest inside a `.keras` zip archive to reference arbitrary Python modules and callable functions resolved during object deserialization. Because `.keras` archives are exchanged widely across research repos and model hubs under the assumption that `safe_mode=True` blocks executable payloads, loading unvetted models compromised host environments. Keras maintainers patched module-resolution restrictions and hardened safe-mode allowlists.
Incident dossier metadata
- Case ID
INC-2025-1550- Classification
- Incident
- Date
- Severity
- Critical
- Sector
- Cloud & AI Infrastructure
- Attack vector
- Supply Chain
- System type
- Keras / TensorFlow Model Loading Pipelines
- CVE / reference
CVE-2025-1550- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-1550
Defensive takeaway
Upgrade Keras past CVE-2025-1550, inspect model archive config manifests before loading, and isolate untrusted model imports in ephemeral sandboxes.
Mapped AI security techniques
- Supply Chain Compromise: Model Repository AML.T0010.003
- User Execution: Unsafe AI Artifacts AML.T0011.000
- Manipulate AI Model: Modify AI Model Architecture AML.T0018.001
- Publish Poisoned AI Artifacts: Models AML.T0115.001
Mapped defensive controls
- Restrict Library Loading AML.M0011
- Verify AI Artifacts AML.M0014
- Vulnerability Scanning AML.M0016
- AI Model Distribution Methods AML.M0017
Source citation records
- NVD Record CVE-2025-1550: Keras safe_mode=True Deserialization RCE Bypass · NIST National Vulnerability Database (NVD) ·