High
Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
Type: advisorySources: OSV
A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attacker to achieve arbitrary code execution by convincing a user to load a specially crafted `.keras` model archive.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-8747
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 05:57 UTC · Revision 1
Source evidence
Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
core-osv · Original sourcePublished 11 Aug 2025, 07:21 UTC
A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attacker to achieve arbitrary code execution by convincing a user to load a specially crafted `.keras` model archive.
osv:CVE-2025-8747
Complete source record
{
"id": "921648465cb422032e14a04d32909218526a65a5dafef161dcb39901a90fc8eb",
"url": "https://osv.dev/vulnerability/CVE-2025-8747",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.",
"summary": "A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attacker to achieve arbitrary code execution by convincing a user to load a specially crafted `.keras` model archive.",
"evidence": "osv:CVE-2025-8747",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-8747",
"aliases": [
"CVE-2025-8747",
"GHSA-c9rc-mg46-23w3",
"PYSEC-2025-75"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/AU:Y/R:A"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/keras-team/keras",
"type": "GIT",
"events": [
{
"introduced": "9c675a9a45e5e8244163fea82efc6066722608a1"
},
{
"last_affected": "3bedb9a970394879360fcb1c0264f3ffdc634a77"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "3.0.0"
},
{
"last_affected": "3.10.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"cpe": "cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.0.0"
},
{
"last_affected": "3.10.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v3.10.0",
"v3.9.0",
"v3.8.0",
"v3.7.0",
"v3.6.0",
"v3.5.0",
"v3.4.1",
"v3.4.0",
"v3.3.3",
"v3.3.2",
"v3.3.1",
"v3.3.0",
"v3.2.1",
"v3.2.0",
"v3.1.1",
"v3.1.0",
"v3.0.5",
"v3.0.4",
"v3.0.3",
"v3.0.2",
"v3.0.1",
"v3.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-8747.json"
}
}
],
"modified": "2026-10-28T02:30:26.468487760Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/8xxx/CVE-2025-8747.json",
"https://jfrog.com/blog/keras-safe_mode-bypass-vulnerability/",
"https://nvd.nist.gov/vuln/detail/CVE-2025-8747",
"https://github.com/keras-team/keras/pull/21429",
"https://github.com/keras-team/keras"
],
"provider_metadata": {
"cwe_ids": [
"CWE-502"
],
"cna_assigner": "Google",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/8xxx/CVE-2025-8747.json"
}
},
"related_cves": [
{
"value": "CVE-2025-8747",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492893,
"published_at": "2025-08-11T07:21:16.619+00:00"
}