CVE-2025-12058: Keras load_model arbitrary local file read and SSRF via StringLookup vocabulary
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2025-12058
- Published
- Record updated
- Affected
- keras < 3.12.0
- Fixed in
- 3.12.0
- released October 27, 2025, 2 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.2%
Summary
CVE-2025-12058 affects the Keras.Model.load_model method, including when called with safe_mode=True. Loading a specially crafted .keras archive with a malicious vocabulary path in the StringLookup layer's configuration lets an attacker read arbitrary local files, retrievable via get_vocabulary(). Because Keras uses tf.io.gfile, which supports remote filesystems and HTTP/HTTPS, the same path can also trigger server-side requests to arbitrary network endpoints. The safe_mode=True flag did not restrict this external path loading.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- kerasPyPINo LLM dependency detected · 6 tracked dependents
Related items
- MediumCVE-2026-111372: AI ChatBot for WooCommerce WoowBot plugin authorization bypass in RAG syncSame vendor · NVD/CVE Database
- HighCVE-2026-117560: ATXP Gemini CLI extension OS command injection in runAtxp() via MCP parametersSame vendor · NVD/CVE Database
- CriticalCVE-2026-90970: GitLab AI Gateway prompt template sandbox escape via crafted flow configurationSame vendor · NVD/CVE Database
- MediumCVE-2026-89278: GPTranslate WordPress plugin exposes plaintext API key to unauthenticated usersSame vendor · NVD/CVE Database
- CriticalCVE-2026-19407: Google Cloud Gemini Enterprise Agent Platform SDK for Python bucket squattingSame vendor · NVD/CVE Database