A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-1025

CVE-2025-1025: Cockpit CMS File Upload Vulnerability

CVE-2025-1025 is an arbitrary file upload vulnerability in Cockpit CMS that allows attackers to bypass upload filters using different file extensions. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-1025 Overview

CVE-2025-1025 is an Arbitrary File Upload vulnerability affecting Cockpit CMS (cockpit-hq/cockpit) versions prior to 2.4.1. This vulnerability allows attackers to bypass the file upload filter by using alternative PHP file extensions, potentially enabling remote code execution on vulnerable systems.

Critical Impact

Attackers can bypass upload restrictions to upload malicious PHP files using alternative extensions like .phar and .phtml, potentially leading to complete server compromise through remote code execution.

Affected Products

  • Cockpit CMS (cockpit-hq/cockpit) versions before 2.4.1

Discovery Timeline

  • February 5, 2025 - CVE-2025-1025 published to NVD
  • February 5, 2025 - Last updated in NVD database

Technical Details for CVE-2025-1025

Vulnerability Analysis

This Arbitrary File Upload vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) exists in Cockpit CMS's file upload functionality. The application implements a security filter to prevent uploading PHP files; however, the filter only blocks files with the .php extension. Attackers can trivially bypass this restriction by using alternative PHP-executable extensions such as .phar and .phtml, which are typically processed by web servers with PHP configurations.

The vulnerability affects two key modules: the Assets manager (modules/Assets/bootstrap.php) and the Finder controller (modules/Finder/Controller/Finder.php). Both components contained inadequate extension validation that only checked for the .php extension, leaving other PHP-executable extensions unblocked.

Root Cause

The root cause is an incomplete denylist implementation in the file extension validation logic. The original code only checked if the file extension equals 'php', failing to account for other extensions that PHP handlers process. This is a classic case of insufficient input validation where security relies on a blocklist approach that doesn't cover all dangerous file types.

Attack Vector

An attacker with access to the file upload functionality can exploit this vulnerability by:

  1. Preparing a malicious PHP payload (e.g., a web shell)
  2. Renaming the file to use an alternative PHP extension (.phar or .phtml)
  3. Uploading the file through the Assets manager or Finder module
  4. Accessing the uploaded file via web browser to execute arbitrary PHP code

This is a network-based attack requiring no user interaction. While some Cockpit installations may require authentication to access upload features, the vulnerability allows authenticated users to escalate their access to arbitrary code execution on the server.

php
// Vulnerable code - only checked for .php extension
if ($_isAllowed && pathinfo($_file, PATHINFO_EXTENSION) === 'php') {
    $_isAllowed = false;
}

// Patched code - now blocks php, phar, and phtml extensions
if ($_isAllowed && in_array(strtolower(pathinfo($_file, PATHINFO_EXTENSION)), ['php', 'phar', 'phtml'])) {
    $_isAllowed = false;
}

Source: GitHub Commit Update

Detection Methods for CVE-2025-1025

Indicators of Compromise

  • Presence of .phar or .phtml files in Cockpit's upload directories
  • Unexpected PHP files in the assets or storage directories
  • Web server logs showing requests to unusual file extensions in upload paths
  • Signs of web shell activity or unauthorized command execution

Detection Strategies

  • Monitor file upload events for files with extensions .phar, .phtml, or other PHP-executable types
  • Implement file integrity monitoring on Cockpit's upload and storage directories
  • Review web server access logs for requests to files with suspicious extensions
  • Deploy web application firewall (WAF) rules to detect malicious file upload attempts

Monitoring Recommendations

  • Enable detailed logging for all file upload activities in Cockpit CMS
  • Set up alerts for any newly created files with PHP-executable extensions in upload directories
  • Monitor for outbound connections from the web server that may indicate web shell activity
  • Regularly scan uploaded content for malicious PHP code patterns

How to Mitigate CVE-2025-1025

Immediate Actions Required

  • Upgrade Cockpit CMS to version 2.4.1 or later immediately
  • Audit existing upload directories for any suspicious .phar, .phtml, or other PHP-executable files
  • Review web server access logs for potential exploitation attempts
  • Consider temporarily disabling file upload functionality until the patch is applied

Patch Information

Cockpit-HQ has released security patches that extend the file extension blocklist to include php, phar, and phtml extensions. The patches also normalize extension comparison to lowercase to prevent case-based bypass attempts.

The security fixes are available in the following commits:

  • Initial patch for Assets bootstrap.php
  • Extended patch covering additional modules

For detailed vulnerability information, see the Snyk Vulnerability Report.

Workarounds

  • Configure web server to disable PHP execution in upload directories using .htaccess or server configuration
  • Implement additional file validation at the web server level to block dangerous extensions
  • Restrict access to file upload functionality to trusted administrators only
  • Use a web application firewall to filter malicious file upload requests
bash
# Apache configuration to prevent PHP execution in uploads directory
# Add to .htaccess or VirtualHost configuration
<Directory "/path/to/cockpit/storage/uploads">
    php_admin_flag engine off
    RemoveHandler .php .phar .phtml
    <FilesMatch "\.(php|phar|phtml)$">
        Require all denied
    </FilesMatch>
</Directory>

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechCockpit

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability6.60%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P/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
  • AvailabilityNone
  • CWE References
  • CWE-434
  • Technical References
  • GitHub Gist PoC

  • GitHub Commit Update

  • GitHub Commit Update

  • Snyk Vulnerability Report
  • Related CVEs
  • CVE-2026-4802: Cockpit RCE Vulnerability

  • CVE-2026-38991: Cockpit CMS RCE Vulnerability

  • CVE-2026-38993: Cockpit Path Traversal Vulnerability

  • CVE-2026-38992: Cockpit CMS 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