The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-51427

CVE-2025-51427: ModelScope 1.25.0 RCE Vulnerability

CVE-2025-51427 is a remote code execution flaw in ModelScope 1.25.0 that allows attackers to execute arbitrary code via a crafted module in the configuration file. This article covers technical details, impact, and mitigation.

Published: May 21, 2026

CVE-2025-51427 Overview

CVE-2025-51427 is an arbitrary code execution vulnerability in ModelScope 1.25.0, an open-source platform for machine learning models. Attackers can execute arbitrary code by supplying a crafted module name under the ['nnet']['module'] key in the dey_mini.yaml configuration file. The flaw is classified as code injection [CWE-94] and stems from unsafe dynamic module loading driven by attacker-controlled configuration input.

Critical Impact

Attackers who can influence the dey_mini.yaml configuration file can load arbitrary Python modules and execute code within the ModelScope process context.

Affected Products

  • ModelScope 1.25.0
  • Workflows that consume dey_mini.yaml configuration files
  • Downstream applications embedding the affected ModelScope version

Discovery Timeline

  • 2026-05-19 - CVE CVE-2025-51427 published to NVD
  • 2026-05-19 - Last updated in NVD database

Technical Details for CVE-2025-51427

Vulnerability Analysis

The vulnerability lives in ModelScope's configuration-driven model loading path. ModelScope reads dey_mini.yaml and resolves the value of the ['nnet']['module'] key to import a Python module at runtime. The framework does not validate or constrain that value against an allowlist of trusted modules. When the resolved module is imported, any top-level code in that module executes inside the ModelScope process.

This behavior maps to CWE-94, Improper Control of Generation of Code. The exploit is purely data-driven: no binary memory corruption is required. An attacker who controls the YAML file, a shared model package, or a model repository entry can plant a malicious Python module reference and trigger execution on every system that loads it.

The network attack vector reflects realistic distribution paths for ModelScope assets, including pulling model bundles and configurations from remote repositories or registries.

Root Cause

The root cause is unsafe dynamic dispatch driven by untrusted configuration. ModelScope treats the module field as a trusted import target and uses Python's import machinery to load it. Because import side effects run arbitrary code, control of the field is equivalent to control of execution. The patch discussion in GitHub Pull Request #1333 addresses how the module reference is resolved and validated.

Attack Vector

An attacker delivers a crafted dey_mini.yaml to a victim, for example by publishing a tampered model package or modifying a shared configuration. When ModelScope 1.25.0 loads the configuration, it imports the attacker-specified module, executing the embedded payload with the privileges of the loading process. See the GitHub CVE-2025-51427 Disclosure and GitHub Issue #1331 Discussion for additional context.

Detection Methods for CVE-2025-51427

Indicators of Compromise

  • Unexpected entries under ['nnet']['module'] in dey_mini.yaml referencing non-standard module paths.
  • Python processes spawning unusual child processes, network connections, or file writes during model load.
  • New or modified .py files inside ModelScope cache, model, or working directories.

Detection Strategies

  • Inspect all dey_mini.yaml files on systems running ModelScope and compare module references against a known-good allowlist.
  • Audit model download sources and verify integrity of model bundles obtained from third-party repositories.
  • Hunt for Python interpreter invocations that import modules from non-standard or world-writable paths during ModelScope workflows.

Monitoring Recommendations

  • Log and alert on writes to ModelScope configuration files, especially dey_mini.yaml.
  • Monitor outbound connections from machine learning training and inference hosts for anomalous destinations.
  • Track process lineage from python and ModelScope CLI entry points to detect post-load command execution.

How to Mitigate CVE-2025-51427

Immediate Actions Required

  • Upgrade ModelScope past version 1.25.0 once a fixed release that incorporates GitHub Pull Request #1333 is available.
  • Treat all dey_mini.yaml files from untrusted sources as untrusted code and review them before loading.
  • Restrict write access to ModelScope configuration directories to trusted users only.

Patch Information

Upstream remediation is tracked in GitHub Pull Request #1333 and GitHub Issue #1331 Discussion. Apply the corresponding upstream fix or upgrade to a patched ModelScope release. Verify that the deployed version no longer resolves arbitrary module names from the ['nnet']['module'] key without validation.

Workarounds

  • Pin ModelScope workflows to vetted, version-controlled configuration files and reject runtime overrides.
  • Run ModelScope inside a sandboxed or containerized environment with no outbound network access where feasible.
  • Implement an allowlist of permitted module paths and reject any dey_mini.yaml referencing modules outside that list.
bash
# Configuration example: validate dey_mini.yaml before loading
grep -E "^\s*module:" dey_mini.yaml | grep -vF -f allowed_modules.txt && \
  echo "Untrusted module reference detected - aborting load" && exit 1

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechModelscope

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-94
  • Technical References
  • GitHub CVE-2025-51427 Disclosure

  • GitHub Issue #1331 Discussion

  • GitHub Pull Request #1333 Changes
  • Related CVEs
  • CVE-2026-6603: ModelScope AgentScope RCE Vulnerability

  • CVE-2026-2256: ModelScope ms-agent RCE Vulnerability

  • CVE-2024-48050: Modelscope Agentscope RCE Vulnerability

  • CVE-2024-8502: AgentScope Deserialization RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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