CVE-2026-22035

Greenshot Vulnerable to OS Command Injection via ExternalCommand Plugin

Published Jan 8, 2026 CVSS 3.1 · 7.8 High EPSS 1.4% KEV · Not listed
Description
Greenshot is an open source Windows screenshot utility. Versions 1.3.310 and below arvulnerable to OS Command Injection through unsanitized filename processing. The FormatArguments method in ExternalCommandDestination.cs:269 uses string.Format() to insert user-controlled filenames directly into shell commands without sanitization, allowing attackers to execute arbitrary commands by crafting malicious filenames containing shell metacharacters. This issue is fixed in version 1.3.311.

Analysis

AI-generated

Technical impact

Greenshot, an open‑source Windows screenshot utility, contains an OS Command Injection flaw in the ExternalCommand plugin. The FormatArguments method concatenates user-controlled filenames directly into shell commands without sanitization. A crafted filename with shell metacharacters can cause Greenshot to execute arbitrary commands, enabling an attacker to gain local command execution on any system where the vulnerable version runs. The vulnerability maps to CWE‑78 and can compromise both the confidentiality and integrity of the affected system.

Affected Systems

The flaw affects Greenshot versions 1.3.310 and all earlier releases. Users running these versions on Windows should be aware that unsanitized filenames processed by the ExternalCommand plugin can be used to inject commands.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity level, while the EPSS score of less than 1% suggests that exploitation is currently unlikely. Greenshot is not listed in the CISA Known Exploited Vulnerabilities catalog. The vulnerability can be exploited via local delivery of a malicious file name or by an attacker who can place a specially crafted file in a location that Greenshot processes. Because the flaw requires local execution of Greenshot, the attack vector is most likely local and requires that the user runs the application or that an attacker can influence the file name used during capture.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Greenshot to version 1.3.311 or later, which removes the vulnerable code.
  • Disable or uninstall the ExternalCommand plugin until the official fix is applied.
  • Audit existing screenshot files for maliciously crafted names and delete any that match the pattern of injected command characters.
  • Restrict who can place or modify screenshot files in directories accessed by Greenshot, limiting the exposure of untrusted file names.

Generated by OpenCVE AI on April 18, 2026 at 07:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Getgreenshot
Getgreenshot greenshot
CPEs cpe:2.3:a:getgreenshot:greenshot:*:*:*:*:*:*:*:*
Vendors & Products Getgreenshot
Getgreenshot greenshot
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Greenshot
Greenshot greenshot
Microsoft
Microsoft windows
Vendors & Products Greenshot
Greenshot greenshot
Microsoft
Microsoft windows
Type Values Removed Values Added
Description Greenshot is an open source Windows screenshot utility. Versions 1.3.310 and below arvulnerable to OS Command Injection through unsanitized filename processing. The FormatArguments method in ExternalCommandDestination.cs:269 uses string.Format() to insert user-controlled filenames directly into shell commands without sanitization, allowing attackers to execute arbitrary commands by crafting malicious filenames containing shell metacharacters. This issue is fixed in version 1.3.311.
Title Greenshot Vulnerable to OS Command Injection via ExternalCommand Plugin
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 26, 2026, 3:04 PM
Reserved
Jan 5, 2026, 10:30 PM
Status
Analyzed
Published
Jan 8, 2026, 1:15 AM
Modified
Jun 17, 2026, 10:19 AM