CVE-2025-55294: Screenshot desktop Screenshot-desktop Vulnerable To Command Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-gjx4-2c7g-fm94
CVSS 9.8
CWE-77
Published
Advisory Summary

CVE-2025-55294 is a CRITICAL (CVSS 9.8) screenshot-desktop vulnerable to command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Screenshot desktop libraries in the npm ecosystem. The issue involves screenshot-desktop vulnerable to command injection via `format` option. Remediation is available by upgrading affected packages to version 1.15.2.

CVE-2025-55294 at a Glance

CVE Identifier CVE-2025-55294
GHSA Identifier GHSA-gjx4-2c7g-fm94
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Screenshot desktop
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-55294

To remediate this vulnerability, upgrade all affected Screenshot desktop dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

screenshot-desktop fixed: 1.15.2
npm install screenshot-desktop@1.15.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls screenshot-desktop

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-55294, inspect your project dependencies using npm:

npm ls screenshot-desktop

Analyze the terminal output to locate any version of Screenshot desktop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.2), your application is affected.

Note: The npm ls screenshot-desktop command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Screenshot desktop, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact This vulnerability is a **command injection** issue. When user-controlled input is passed into the `format` option of the screenshot function, it is interpolated into a shell command without sanitization. An attacker can craft malicious input such as: { format: "; echo vulnerable > /tmp/hello;" } This results in arbitrary command execution with the privileges of the calling process. **Who is impacted:** Any application that accepts untrusted input and forwards it directly (or indirectly) into the `format` option is affected. If the library is used in a server-side context (e.g., API endpoints, web services), attackers may be able to exploit this **remotely and without authentication**, leading to full compromise of confidentiality, integrity, and availability. **CVSS v3.1 Base Score:** 9.8 (Critical) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H` ## Patches The issue has been patched in **version 1.15.2**. All users are strongly recommended to upgrade to **1.15.2 or later**. All earlier versions are vulnerable. ## Workarounds If upgrading is not immediately possible, developers should: - **Strictly validate or whitelist** acceptable `format` values (e.g., `"jpeg"`, `"png"`, `"webp"`). - **Reject or sanitize** any unexpected input before passing it to the library. - Avoid allowing user-controlled data to reach the `format` option. ## References - [CWE-78: OS Command Injection](https://cwe.mitre.org/data/definitions/78.html) - [OWASP: Command Injection](https://owasp.org/www-community/attacks/Command_Injection)

CVE-2025-55294 Affected Screenshot desktop Versions

1 component(s)
Fixed Versions:
1.15.2
Product / Package Ecosystem Affected Versions Fixed Version
screenshot-desktop
npm
< 1.15.2
1.15.2

References

Frequently Asked Questions

What is CVE-2025-55294?
CVE-2025-55294 is a security vulnerability in Screenshot desktop involving screenshot-desktop vulnerable to command Injection via `format` option under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Screenshot desktop versions are affected?
Affected versions include releases prior to 1.15.2 across affected packages: screenshot-desktop.
What version fixes CVE-2025-55294?
Upgrading to 1.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is screenshot-desktop affected?
Yes, screenshot-desktop is affected in releases prior to 1.15.2. Upgrade your dependency to 1.15.2 or later.
What is the CVSS score of CVE-2025-55294?
CVE-2025-55294 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-55294?
CVE-2025-55294 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2025-55294?
Run the dependency tree command: 'npm ls screenshot-desktop'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gjx4-2c7g-fm94",
  "modified" : "2025-08-19T20:17:45Z",
  "published" : "2025-08-19T20:17:45Z",
  "aliases" : [ "CVE-2025-55294" ],
  "summary" : "screenshot-desktop vulnerable to command Injection via `format` option",
  "details" : "## Impact\nThis vulnerability is a **command injection** issue.  \nWhen user-controlled input is passed into the `format` option of the screenshot function, it is interpolated into a shell command without sanitization.  \nAn attacker can craft malicious input such as:\n\n    { format: \"; echo vulnerable > /tmp/hello;\" }\n\nThis results in arbitrary command execution with the privileges of the calling process.\n\n**Who is impacted:**  \nAny application that accepts untrusted input and forwards it directly (or indirectly) into the `format` option is affected. If the library is used in a server-side context (e.g., API endpoints, web services), attackers may be able to exploit this **remotely and without authentication**, leading to full compromise of confidentiality, integrity, and availability.\n\n**CVSS v3.1 Base Score:** 9.8 (Critical)  \n`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`\n\n\n## Patches\nThe issue has been patched in **version 1.15.2**.  \nAll users are strongly recommended to upgrade to **1.15.2 or later**.  \nAll earlier versions are vulnerable.\n\n\n\n## Workarounds\nIf upgrading is not immediately possible, developers should:\n- **Strictly validate or whitelist** acceptable `format` values (e.g., `\"jpeg\"`, `\"png\"`, `\"webp\"`).\n- **Reject or sanitize** any unexpected input before passing it to the library.\n- Avoid allowing user-controlled data to reach the `format` option.\n\n\n\n## References\n- [CWE-78: OS Command Injection](https://cwe.mitre.org/data/definitions/78.html)  \n- [OWASP: Command Injection](https://owasp.org/www-community/attacks/Command_Injection)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "screenshot-desktop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.15.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bencevans/screenshot-desktop/security/advisories/GHSA-gjx4-2c7g-fm94"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bencevans/screenshot-desktop/commit/59c87b0c175eec76090e6ccde313f4fc5d569b78"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bencevans/screenshot-desktop"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-19T20:17:45Z",
    "nvd_published_at" : "2025-08-19T18:15:29Z"
  }
}