Skip to main content
CVE-2025-12058VulnerabilityPublished Updated

The Keras.Model.load_model method, including when executed with the intended security mitigation safe_mode=True, is

Affects kerasSource GCVE Database

0
Compare

Not known to be exploited · CVSS 5.9 Medium.

Data as of 4 Nov 2026, 18:25 UTC

CVSS 4.0 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.
CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:L/VA:L/SC:H/SI:L/SA:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Oct 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Nov 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu 20.04 LTSkeraspkg:deb/ubuntu/keras?arch=source&distro=focalOther threatsAffected
  • =2.2.4-1
Fixed in–
Ubuntu 18.04 LTSkeraspkg:deb/ubuntu/keras?arch=source&distro=bionicOther threatsAffected
  • =1.0.7-2
  • =2.1.1-1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Until a fix is available, avoid loading untrusted or unauthenticated .keras model files. Review and restrict file access permissions for processes loading Keras models to limit potential exposure.

Description

The Keras.Model.load_model method is vulnerable to arbitrary local file reading and Server-Side Request Forgery (SSRF) due to improper handling of the StringLookup layer's vocabulary argument during model loading. This occurs even when the safe_mode=True mitigation is enabled. An attacker can craft a malicious .keras file that causes the model loader to read local files or fetch remote content via supported protocols, potentially exposing sensitive data or enabling SSRF attacks.

References

Community reviews

Loading reviews…