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-2690

CVE-2025-2690: Yiiframework Yii RCE Vulnerability

CVE-2025-2690 is a critical remote code execution vulnerability in Yiiframework Yii2 up to version 2.0.39 caused by insecure deserialization. This article covers technical details, affected versions, and mitigation.

Published: April 1, 2026

CVE-2025-2690 Overview

A critical insecure deserialization vulnerability has been discovered in yiisoft Yii2 framework versions up to 2.0.39. This vulnerability affects the Generate function within the file phpunit\src\Framework\MockObject\MockClass.php. The flaw allows remote attackers to manipulate deserialization processes, potentially leading to arbitrary code execution on vulnerable systems.

Critical Impact

Remote attackers can exploit this deserialization vulnerability to execute arbitrary code, potentially gaining full control over affected web applications and underlying server infrastructure.

Affected Products

  • Yiiframework Yii versions up to 2.0.39
  • Applications built using the vulnerable Yii2 framework
  • Systems utilizing PHPUnit MockObject functionality within Yii2

Discovery Timeline

  • 2025-03-24 - CVE-2025-2690 published to NVD
  • 2025-03-24 - Last updated in NVD database

Technical Details for CVE-2025-2690

Vulnerability Analysis

This insecure deserialization vulnerability (CWE-502) exists in the Yii2 framework's PHPUnit integration, specifically within the MockClass component. The vulnerability stems from improper input validation (CWE-20) when processing serialized data through the Generate function.

Insecure deserialization occurs when an application deserializes untrusted data without proper validation, allowing attackers to inject malicious serialized objects. In PHP applications like those built with Yii2, this can lead to object injection attacks where attackers can instantiate arbitrary objects and invoke magic methods such as __wakeup() or __destruct() to achieve code execution.

The network-accessible nature of this vulnerability means it can be exploited remotely without requiring significant attacker privileges, making it particularly dangerous for internet-facing Yii2 applications.

Root Cause

The root cause of this vulnerability lies in the improper handling of serialized data within the MockClass.php file. The Generate function fails to adequately validate or sanitize input before deserialization, allowing malicious payloads to be processed. This lack of input validation enables attackers to craft specially designed serialized objects that exploit PHP's object instantiation mechanisms.

Attack Vector

The attack vector for CVE-2025-2690 is network-based, allowing remote exploitation. An attacker can craft a malicious serialized payload and send it to a vulnerable Yii2 application endpoint that processes the data through the affected Generate function. Upon deserialization, the malicious payload triggers arbitrary code execution through PHP's magic method invocation chain.

The exploitation technique typically involves identifying gadget chains within the application's codebase that can be leveraged during deserialization to achieve code execution. Technical details and exploitation guidance have been publicly disclosed. For more information, see the GitHub Exploit Guide and VulDB CTI #300711.

Detection Methods for CVE-2025-2690

Indicators of Compromise

  • Unusual serialized data patterns in HTTP requests targeting Yii2 application endpoints
  • Web server logs showing requests with base64-encoded or URL-encoded serialized PHP objects
  • Unexpected process executions or file system modifications originating from web application processes
  • Error logs containing deserialization-related exceptions or unexpected object instantiation attempts

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block serialized PHP object patterns in incoming requests
  • Monitor application logs for deserialization errors or unexpected class instantiation attempts
  • Deploy runtime application self-protection (RASP) solutions to detect object injection attempts
  • Utilize SentinelOne's behavioral AI to identify anomalous code execution patterns originating from PHP processes

Monitoring Recommendations

  • Enable verbose logging for the Yii2 framework to capture deserialization events
  • Monitor outbound network connections from web server processes for potential reverse shell indicators
  • Implement file integrity monitoring on critical application directories
  • Set up alerts for unexpected child processes spawned by PHP-FPM or Apache/Nginx workers

How to Mitigate CVE-2025-2690

Immediate Actions Required

  • Audit your Yii2 applications to identify if they use versions up to 2.0.39
  • Review application code for endpoints that may process user-controlled serialized data
  • Implement input validation and sanitization on all data that may be deserialized
  • Consider restricting access to development and testing endpoints that utilize PHPUnit MockObject functionality

Patch Information

Organizations should monitor yiisoft's official channels for security patches addressing this vulnerability. Review the VulDB #300711 for the latest advisory information and patch availability. It is recommended to upgrade to a patched version of Yii2 as soon as one becomes available.

Workarounds

  • Disable or remove PHPUnit components from production environments, as they are typically intended for development use only
  • Implement strict input validation to reject serialized data from untrusted sources
  • Use a whitelist approach for allowed classes during deserialization where possible
  • Deploy network segmentation to limit exposure of Yii2 applications to trusted networks only
  • Consider using PHP's unserialize() with the allowed_classes parameter set to false or a specific whitelist
bash
# Configuration example - Remove PHPUnit from production
# In your composer.json, ensure PHPUnit is in require-dev only
composer remove --dev phpunit/phpunit
composer install --no-dev --optimize-autoloader

# Verify PHPUnit is not present in production
find /var/www/html -name "MockClass.php" -path "*/phpunit/*" 2>/dev/null

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechYiiframework

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-20

  • CWE-502
  • Technical References
  • GitHub Exploit Guide

  • VulDB CTI #300711

  • VulDB #300711

  • VulDB Submission #521718
  • Related CVEs
  • CVE-2024-4990: Yiiframework Yii RCE Vulnerability

  • CVE-2025-2689: Yiiframework Yii RCE Vulnerability

  • CVE-2020-15148: Yiiframework Yii 2 RCE Vulnerability

  • CVE-2024-58136: Yiiframework Yii Privilege Escalation
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