Safe Mode Bypass in keras-team/keras
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 fixed, 1 without a fix
Attack profile from CVSS 3.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
A vulnerability in the `TFSMLayer` class of the `keras` package, version 3.13.0, allows attacker-controlled TensorFlow SavedModels to be loaded during deserialization of `.keras` models, even when `safe_mode=True`. This bypasses the security guarantees of `safe_mode` and enables arbitrary attacker-controlled code execution during model inference under the victim's privileges. The issue arises due to the unconditional loading of external SavedModels, serialization of attacker-controlled file paths, and the lack of validation in the `from_config()` method.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| keras-team | keras-team/keras | before 3.13.2 | 3.13.2 | Patch available | CNA |
| — | keras (PyPI) | before 3.13.2 | 3.13.2 | Patch available | GHSA-4f3f-g24h-fr8m |
- keras-team/keras Vendorkeras-team Affected before 3.13.2 Fixed in 3.13.2 Patch available CNA
- keras (PyPI) Vendor— Affected before 3.13.2 Fixed in 3.13.2 Patch available GHSA-4f3f-g24h-fr8m
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:keras:keras:3.13.0:*:*:*:*:*:*:* | 3.13.0 | Vulnerable | keras-team |
| cpe:2.3:a:redhat:openshift_ai:*:*:*:*:*:*:*:* | 2.25 to before 2.25.7 | Vulnerable | Red Hat |
- cpe:2.3:a:keras:keras:3.13.0:*:*:*:*:*:*:* Versions 3.13.0 Vulnerable ·keras-team
- cpe:2.3:a:redhat:openshift_ai:*:*:*:*:*:*:*:* Versions 2.25 to before 2.25.7 Vulnerable ·Red Hat
Remediation
- Fix · CNA keras-team/keras (keras-team) Fixed in 3.13.2
- Fix · GHSA-4f3f-g24h-fr8m keras (PyPI) Fixed in 3.13.2 Advisory →
Red Hat 2 advisories
- RHSA-2026:37275 Released 2026-07-09 · Red Hat rating CriticalRHOAI 3.3.5 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.3 registry.redhat.io/rhoai/odh-dashboard-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-operator-controller-rhel9, registry.redhat.io/rhoai/odh-feast-operator-rhel9 +45
- RHSA-2026:24977 Released 2026-06-10 · Red Hat rating ImportantRHOAI 2.25.7 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-caikit-tgis-serving-rhel9, registry.redhat.io/rhoai/odh-dashboard-rhel9 +34
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat OpenShift AI 2.25 | Fixed | RHSA-2026:24977 |
| Red Hat OpenShift AI 3.3 | Fixed | RHSA-2026:37275 |
Not affected: 3 products
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 2.25
- Red Hat OpenShift AI 3.3
Timeline
- 2026-10-02 Threatist record created from CVE-2026-1462
- 2026-10-03 Alias added: GHSA-4f3f-g24h-fr8m
References
Advisory 5
More keras-team Keras vulnerabilities
- TI-2026-10715 Deserialization of Untrusted Data in keras-team/keras CVSS 3.1CRITICAL 9.8
- TI-2025-08001 Keras safe_mode bypass allows arbitrary code execution when loading a malicious model. CVSS 4.0HIGH 8.6
- TI-2026-10199 Path Traversal in keras-team/keras CVSS 3.0HIGH 8.1
- TI-2025-01336 Arbitrary Code Execution via Crafted Keras Config for Model Loading CVSS 4.0HIGH 7.3
- TI-2026-10716 Path Traversal via Symlink Name Validation Bypass in keras-team/keras CVSS 3.1MEDIUM 6.5
- TI-2024-36840 An issue in keras 3.7.0 allows attackers to write arbitrary files to the user's machine… CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-1462 · CVE Program
- CVE-2026-1462 · NVD
- FIRST EPSS
- GHSA-4f3f-g24h-fr8m · GitHub Advisory Database · CC BY 4.0
- CVE-2026-1462 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences