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

CVE-2025-55294: screenshot-desktop RCE Vulnerability

CVE-2025-55294 is a command injection flaw in screenshot-desktop that enables remote code execution through unsanitized user input. This article covers the technical details, affected versions, and mitigation strategies.

Published: March 18, 2026

CVE-2025-55294 Overview

CVE-2025-55294 is a critical command injection vulnerability in the screenshot-desktop npm package, which is used for capturing screenshots of local machines. When user-controlled input is passed into the format option of the screenshot function, it is interpolated into a shell command without proper sanitization. This results in arbitrary command execution with the privileges of the calling process, potentially allowing attackers to fully compromise affected systems.

Critical Impact

Remote attackers can achieve arbitrary command execution by injecting malicious payloads through the unsanitized format parameter, leading to complete system compromise with the privileges of the running Node.js process.

Affected Products

  • screenshot-desktop npm package versions prior to 1.15.2
  • Applications using screenshot-desktop with user-controlled format options
  • Node.js applications that accept untrusted input for screenshot configuration

Discovery Timeline

  • 2025-08-19 - CVE-2025-55294 published to NVD
  • 2025-08-20 - Last updated in NVD database

Technical Details for CVE-2025-55294

Vulnerability Analysis

This vulnerability (CWE-77: Command Injection) exists in the screenshot-desktop library's handling of the format parameter across multiple platform implementations. The vulnerable code directly interpolates user-supplied input into shell commands without validation or sanitization. An attacker who can control the format option passed to the screenshot function can inject arbitrary shell commands that will be executed on the underlying operating system.

The vulnerability affects both the Darwin (macOS) and Linux implementations of the library, where the format option was being concatenated directly into command strings that were subsequently executed via shell. This is particularly dangerous because screenshot functionality is often exposed in applications that process user input, creating a direct path from untrusted data to command execution.

Root Cause

The root cause of this vulnerability is improper input validation in the screenshot-desktop library. The code directly passed user-controlled input (the format option) into shell command construction without any validation against an allowlist of acceptable values or sanitization of special characters. This classic command injection pattern occurs when shell metacharacters in the input can break out of the intended command context and execute arbitrary commands.

Attack Vector

The attack vector is network-accessible, requiring no authentication or user interaction. An attacker can exploit this vulnerability by providing a malicious value for the format parameter that includes shell metacharacters and commands. When the screenshot function processes this input, the injected commands are executed with the same privileges as the Node.js process running the application.

For example, an attacker could supply a format value containing command separators (;, &&, |) followed by arbitrary commands to achieve code execution on the target system.

The security patch implements multiple defensive measures as shown in the commit:

javascript
       return reject(new Error(`Invalid choice of displayId: ${displayId} ${validChoiceMsg}`))
     }
 
-    const format = options.format || 'jpg'
-    let filename
-    let suffix
+    // Validate format
+    const allowedFormats = ['jpg', 'jpeg', 'png', 'tiff', 'bmp', 'gif', 'pdf']
+    const format = (options.format || 'jpg').toLowerCase()
+    if (!allowedFormats.includes(format)) {
+      return reject(new Error('Invalid format'))
+    }
+
+    // Sanitize filename
+    let filename, suffix
     if (options.filename) {
-      const ix = options.filename.lastIndexOf('.')
-      suffix = ix >= 0 ? options.filename.slice(ix) : `.${format}`
-      filename = '"' + options.filename.replace(/"/g, '\\"') + '"'
+      // Only allow safe characters in filename
+      const safeFilename = options.filename.replace(/[^a-zA-Z0-9._\-/]/g, '')
+      const ix = safeFilename.lastIndexOf('.')
+      suffix = ix >= 0 ? safeFilename.slice(ix) : `.${format}`
+      filename = safeFilename
     } else {
       suffix = `.${format}`
     }

Source: GitHub Commit Reference

The Linux implementation also received similar hardening:

javascript
     listDisplays().then((screens) => {
       const screen = screens.find(options.screen ? screen => screen.id === options.screen : screen => screen.primary || screen.id === 'default') || screens[0]
 
-      const filename = options.filename ? (options.filename.replace(/"/g, '\\"')) : '-'
+      // Validate format
+      const allowedFormats = ['jpg', 'jpeg', 'png', 'tiff', 'bmp', 'gif']
+      const filetype = (options.format || guessFiletype(options.filename || '')).toLowerCase()
+      if (!allowedFormats.includes(filetype)) {
+        return reject(new Error('Invalid format'))
+      }
+
+      // Sanitize filename
+      const filename = options.filename ? options.filename.replace(/[^a-zA-Z0-9._\-/]/g, '') : '-'
       const execOptions =
         options.filename
           ? {}
           : {
               encoding: 'buffer',
               maxBuffer: maxBuffer(screens)
             }
-      const filetype = options.format || guessFiletype(filename)
 
-      let commandLine = ''
+      let cmd, args
       switch (options.linuxLibrary) {
-        case 'scrot': // Faster. Does not support crop.
-          commandLine = `scrot "${filename}" -e -z "echo \\"${filename}\\""`
+        case 'scrot':
+          cmd = 'scrot'
+          args = [filename, '-e', '-z', 'echo "' + filename + '"']

Source: GitHub Commit Reference

Detection Methods for CVE-2025-55294

Indicators of Compromise

  • Unexpected child processes spawned by Node.js applications using screenshot-desktop
  • Unusual shell command patterns in process logs containing screenshot-related strings followed by command separators
  • Anomalous network connections or file system modifications originating from Node.js processes
  • Log entries showing errors related to screenshot format validation after patching

Detection Strategies

  • Monitor for unusual command-line arguments in processes spawned by Node.js applications, particularly those containing shell metacharacters
  • Implement application-level logging to capture screenshot function calls and their parameters
  • Use Software Composition Analysis (SCA) tools to identify applications using vulnerable versions of screenshot-desktop
  • Deploy runtime application self-protection (RASP) to detect command injection attempts

Monitoring Recommendations

  • Enable process creation auditing to track child processes spawned by Node.js applications
  • Configure alerts for screenshot-desktop related processes executing unexpected commands
  • Review application logs for malformed format parameters or validation errors
  • Monitor for the presence of vulnerable screenshot-desktop versions in npm dependency trees

How to Mitigate CVE-2025-55294

Immediate Actions Required

  • Upgrade screenshot-desktop to version 1.15.2 or later immediately
  • Audit applications to identify any usage of screenshot-desktop with user-controlled input
  • Implement input validation at the application layer as defense-in-depth
  • Review process privileges to ensure screenshot functionality runs with minimal required permissions

Patch Information

The vulnerability has been fixed in screenshot-desktop version 1.15.2. The fix implements allowlist validation for the format parameter, restricting it to known-safe values (jpg, jpeg, png, tiff, bmp, gif, pdf). Additionally, the patch switches from shell command execution to execFile, which prevents shell interpretation of arguments. Filename sanitization has also been added to remove potentially dangerous characters.

For detailed patch information, refer to the GitHub Security Advisory and the security fix commit.

Workarounds

  • If immediate patching is not possible, implement application-level validation to restrict format options to a known-safe allowlist
  • Avoid passing user-controlled input to screenshot-desktop configuration options
  • Run Node.js applications with reduced privileges to limit the impact of potential exploitation
  • Consider using alternative screenshot libraries that implement proper input validation
bash
# Update screenshot-desktop to patched version
npm update screenshot-desktop@1.15.2

# Verify installed version
npm list screenshot-desktop

# Audit for vulnerabilities in dependencies
npm audit

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechScreenshot Desktop

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.25%

  • 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-77
  • Technical References
  • GitHub Commit Reference

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS 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