☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.8 🐛 CWE-77
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-55294

CVE-2025-55294 Command Injection in Screenshot-desktop
📅 PUBLISHED: 2025-08-19 17:34 UTC 🔄 UPDATED: 2026-10-08 19:49 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.44%
👁️
1.44% probability
36.0× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-55294 is a critical command injection vulnerability in the screenshot-desktop npm package (versions prior to 1.15.2). The flaw exists in the screenshot() function, where user-controlled input supplied to the format option is directly interpolated into a shell command without sanitization. This allows an attacker to execute arbitrary commands with the privileges of the calling process. With a CVSS score of 9.8, this vulnerability poses a severe risk to any application that passes untrusted input to the format parameter. The vendor has released a fix in version 1.15.2.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the screenshot-desktop npm package. Applications that use this package and allow user-controlled input to influence the format option are at risk. The attack vector is remote if the application exposes this functionality via a web interface or API. The package is widely used for capturing screenshots in Node.js applications, making this a significant supply chain risk. Developers must immediately update to version 1.15.2 or later and audit any code that passes user input to the screenshot() function.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely if the application accepts user input.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) – Full system compromise possible.
  • Integrity (I): High (H) – Arbitrary commands can be executed.
  • Availability (A): High (H) – System can be disrupted.

Threat Level: Critical. The combination of remote exploitability, low complexity, and no required privileges makes this a high-priority vulnerability for patching.

Deep Dive & Mechanics

The screenshot-desktop package uses a shell command (likely scrot, import, or similar) to capture screenshots. The format option is used to specify the output file format (e.g., png, jpg). In vulnerable versions, this option is directly concatenated into a shell command string without escaping or sanitization.

For example, the vulnerable code might look like:

const cmd = `scrot -q 100 ${format}`;
exec(cmd, callback);

If an attacker provides a format value like png; malicious_command, the shell interprets the semicolon as a command separator, executing the attacker's payload.

The fix in version 1.15.2 likely involves using execFile instead of exec, or properly escaping the input using a library like shell-escape.

Vulnerable vs. Patched Code

Vulnerable Code (pre-1.15.2):

const { exec } = require('child_process');
function screenshot(options) {
  const format = options.format || 'png';
  const cmd = `scrot -q 100 ${format}`;
  exec(cmd, (err, stdout, stderr) => {
    // handle result
  });
}

Patched Code (1.15.2+):

const { execFile } = require('child_process');
function screenshot(options) {
  const format = options.format || 'png';
  // Use execFile to avoid shell injection
  execFile('scrot', ['-q', '100', format], (err, stdout, stderr) => {
    // handle result
  });
}

The patched version uses execFile which does not spawn a shell, thus preventing command injection. Alternatively, the input could be sanitized with a whitelist of allowed formats.

Exploitation & Lab Setup

Red Team (Offensive)

Proof of Concept (PoC):

const screenshot = require('screenshot-desktop');
// Malicious format option to execute a command
screenshot({ format: 'png; echo "pwned" > /tmp/pwned.txt' })
  .then((img) => {
    console.log('Screenshot taken');
  })
  .catch((err) => {
    console.error(err);
  });

Lab Setup:

  1. Install vulnerable version: npm install screenshot-desktop@1.15.0
  2. Create a simple Node.js app that accepts user input for the format option.
  3. Run the app and send a request with the malicious format payload.
  4. Verify command execution (e.g., check for /tmp/pwned.txt).

Exploit-DB Code: None available.

Blue Team (Defensive)

Detection:

  • Monitor for unusual child process executions (e.g., scrot with unexpected arguments).
  • Look for shell metacharacters (;, |, &, `) in the format parameter.
  • Use the Sigma rule below to detect exploitation attempts.

Hunting:

  • Search logs for scrot commands with suspicious arguments.
  • Check for outbound connections or file modifications following a screenshot capture.

Indicators of Compromise (IOCs)

  • File: /tmp/pwned.txt (or similar files created by attacker)
  • Process: scrot -q 100 png; <malicious_command>
  • Network: Unexpected outbound connections from the Node.js process
  • Logs: Shell command execution logs containing scrot with special characters

Detection Engineering

YARA Rule

rule CVE_2025_55294_CommandInjection {
  meta:
    description = "Detects command injection attempts against screenshot-desktop"
    author = "Valters IT"
    date = "2025-04-10"
    reference = "CVE-2025-55294"
  strings:
    $s1 = "screenshot-desktop" nocase
    $s2 = "format" nocase
    $s3 = /[;&|`$()]/
  condition:
    all of ($s1, $s2, $s3)
}

Sigma Rule

title: CVE-2025-55294 - Command Injection in screenshot-desktop
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects exploitation attempts of command injection in screenshot-desktop via format option
author: Valters IT
date: 2025/04/10
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith: '\node.exe'
    CommandLine|contains: 'scrot'
    CommandLine|contains|all:
      - '-q'
      - '100'
    CommandLine|contains:
      - ';'
      - '|'
      - '&'
      - '`'
      - '$('
  condition: selection
falsepositives:
  - Legitimate use of special characters in format (unlikely)
level: critical

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-55294 - Command Injection in screenshot-desktop"; flow:to_server,established; content:"format"; nocase; pcre:"/format\s*=\s*[^&]*[;&|`$]/i"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Update: Upgrade screenshot-desktop to version 1.15.2 or later.
  2. Input Validation: If updating is not possible, implement strict input validation for the format option. Only allow alphanumeric characters and a whitelist of known formats (e.g., png, jpg, bmp).
  3. Use execFile: Ensure any custom code using exec is replaced with execFile or spawn to avoid shell injection.
  4. Monitor Logs: Actively monitor for suspicious process executions and network connections.
  5. Apply WAF Rules: Use Web Application Firewall rules to block requests containing shell metacharacters in the format parameter.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-55294/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.