{"id":70513,"date":"2025-09-19T13:31:41","date_gmt":"2025-09-19T10:01:41","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-9905-arbitary-code-execution-in-keras-load_model\/"},"modified":"2025-09-19T13:31:41","modified_gmt":"2025-09-19T10:01:41","slug":"cve-2025-9905-arbitary-code-execution-in-keras-load_model","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-9905-arbitary-code-execution-in-keras-load_model\/","title":{"rendered":"CVE-2025-9905 &#8211; Arbitary Code execution in Keras load_model()"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-9905<br \/>\n<br \/>\n<strong>Published : <\/strong> 19. September 2025 08:16 | 47\u00a0Minuten ago<br \/>\n<br \/>\n<strong>Description : <\/strong>The Keras Model.load_model\u00a0method can be exploited to achieve arbitrary code execution, even with safe_mode=True.<\/p>\n<p>One can create a specially crafted .h5\/.hdf5\u00a0model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed.<\/p>\n<p>This is achieved by crafting a special .h5\u00a0archive file that uses the Lambda\u00a0layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True\u00a0option is not honored when reading .h5\u00a0archives.<\/p>\n<p>Note that the .h5\/.hdf5\u00a0format is a legacy format supported by Keras 3 for backwards compatibility.<br \/>\n<br \/>\n<strong>Severity:<\/strong> 7.3 | HIGH<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-9905 Published : 19. September 2025 08:16 | 47\u00a0Minuten ago Description : The Keras Model.load_model\u00a0method can be exploited to achieve arbitrary code execution, even with safe_mode=True. One can create a specially crafted .h5\/.hdf5\u00a0model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-70513","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/70513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=70513"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/70513\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=70513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=70513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=70513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}