Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-49655

CVE-2025-49655: Keras Framework RCE Vulnerability

CVE-2025-49655 is a remote code execution flaw in Keras framework versions 3.11.0 to 3.11.2 caused by unsafe deserialization. Malicious files can execute arbitrary code even in safe mode. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 11, 2026

CVE-2025-49655 Overview

CVE-2025-49655 is a critical insecure deserialization vulnerability in the Keras deep learning framework that allows attackers to execute arbitrary code on target systems. The vulnerability exists in Keras versions 3.11.0 through 3.11.2, where a maliciously crafted Keras model file containing a TorchModuleWrapper class can bypass safe mode protections and execute arbitrary code when loaded by an unsuspecting user. This vulnerability can be triggered through both local and remote model files, making it particularly dangerous in environments where machine learning models are shared or downloaded from external sources.

Critical Impact

This vulnerability enables remote code execution through malicious Keras model files, bypassing safe mode protections and potentially compromising systems that load untrusted machine learning models.

Affected Products

  • Keras framework versions 3.11.0 to 3.11.2
  • Applications and services that load Keras model files from untrusted sources
  • Machine learning pipelines that download and deserialize external model files

Discovery Timeline

  • 2025-10-17 - CVE-2025-49655 published to NVD
  • 2025-10-21 - Last updated in NVD database

Technical Details for CVE-2025-49655

Vulnerability Analysis

This vulnerability is classified as CWE-502 (Deserialization of Untrusted Data), a well-known class of security issues that occurs when applications deserialize data from untrusted sources without proper validation. In the context of Keras, the framework provides a "safe mode" feature intended to prevent code execution when loading model files. However, this implementation contains a critical flaw that allows the TorchModuleWrapper class to bypass these safety mechanisms.

When a Keras model file is loaded, the framework deserializes the stored objects to reconstruct the model architecture. The TorchModuleWrapper class, which provides interoperability between Keras and PyTorch, was not properly restricted under safe mode, creating an exploitation pathway. An attacker can craft a malicious .keras model file that embeds arbitrary Python code within a TorchModuleWrapper object, which gets executed during the deserialization process regardless of safe mode settings.

Root Cause

The root cause of this vulnerability lies in the incomplete implementation of safe mode restrictions in the Keras model loading functionality. The TorchModuleWrapper class was inadvertently excluded from the allowlist/blocklist mechanism that safe mode uses to prevent dangerous object deserialization. This oversight allows malicious payloads embedded within TorchModuleWrapper instances to execute during model loading, completely circumventing the security controls that users reasonably expect when enabling safe mode.

Attack Vector

The attack can be executed through network-based delivery of malicious model files. An attacker would craft a Keras model file containing a weaponized TorchModuleWrapper object with embedded malicious code. This file could be distributed through:

  • Model sharing platforms and repositories
  • Compromised machine learning model hubs
  • Supply chain attacks targeting ML pipelines
  • Phishing attacks targeting data scientists and ML engineers
  • Man-in-the-middle attacks on model download operations

When a victim loads the malicious model file using Keras (even with safe mode enabled), the embedded code executes with the privileges of the user running the application. This can lead to complete system compromise, data exfiltration, or further lateral movement within an organization's infrastructure.

The attack requires no authentication and no user interaction beyond loading the malicious model file, making it highly exploitable in automated ML pipeline environments where models are frequently downloaded and processed from external sources.

Detection Methods for CVE-2025-49655

Indicators of Compromise

  • Unexpected network connections or data exfiltration attempts following Keras model loading operations
  • Unusual process spawning or command execution originating from Python/Keras processes
  • Suspicious .keras or .h5 model files with unexpected TorchModuleWrapper configurations
  • Anomalous file system activity after model deserialization in ML pipelines
  • Unexpected system modifications or persistence mechanisms created by ML application processes

Detection Strategies

  • Monitor Keras model loading operations for files containing TorchModuleWrapper classes from untrusted sources
  • Implement file integrity monitoring on model storage directories and ML artifact repositories
  • Deploy endpoint detection rules to identify suspicious process trees spawned from Python ML applications
  • Enable application logging for all model loading operations with source tracking
  • Use static analysis tools to scan incoming model files for potentially malicious embedded code

Monitoring Recommendations

  • Implement network segmentation for ML pipeline infrastructure to limit blast radius of potential compromises
  • Enable verbose logging for Keras model loading operations in production environments
  • Monitor for unusual Python process behavior including unexpected subprocess creation or network activity
  • Establish baseline behavior for ML applications and alert on deviations following model loading events
  • Deploy SentinelOne agents on systems running Keras to detect post-exploitation activity

How to Mitigate CVE-2025-49655

Immediate Actions Required

  • Upgrade Keras to version 3.11.3 or later immediately on all affected systems
  • Audit all Keras model files currently in use for unexpected or suspicious TorchModuleWrapper content
  • Restrict model loading to trusted, verified sources until patching is complete
  • Implement network-level controls to prevent downloading models from untrusted external sources
  • Review and enhance input validation for any ML pipelines that accept external model files

Patch Information

The Keras development team has addressed this vulnerability in version 3.11.3. The fix implements proper restrictions on the TorchModuleWrapper class when safe mode is enabled, preventing arbitrary code execution during deserialization. Organizations should upgrade to Keras 3.11.3 or later as soon as possible.

For detailed information about the fix, refer to the Keras Pull Request #21575 and the HiddenLayer Security Advisory.

Workarounds

  • Avoid loading Keras model files from untrusted or unverified sources until the patch is applied
  • Implement strict model file validation and scanning before loading in production environments
  • Use containerized or sandboxed environments for loading models from external sources to limit potential impact
  • Apply network-level controls to restrict outbound connections from ML pipeline infrastructure
  • Consider implementing model signing and verification mechanisms to ensure model integrity
bash
# Upgrade Keras to patched version
pip install --upgrade keras>=3.11.3

# Verify installed version
python -c "import keras; print(keras.__version__)"

# For conda environments
conda install -c conda-forge keras>=3.11.3

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechKeras

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Technical References
  • GitHub Keras Pull Request

  • HiddenLayer Security Advisor
  • Related CVEs
  • CVE-2026-1462: Keras Package RCE Vulnerability

  • CVE-2024-3660: Keras Framework RCE Vulnerability

  • CVE-2024-55459: Keras RCE Vulnerability

  • CVE-2025-1550: Keras Model RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English