{"id":"CVE-2025-55294","aliases":["CVE-2025-55294","GHSA-gjx4-2c7g-fm94"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection via `format` option in screenshot-desktop","summary":"screenshot-desktop allows capturing a screenshot of your local machine. 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. This results in arbitrary command execution with the privileges of the calling process. This vulnerability is fixed in 1.15.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"screenshot-desktop allows capturing a screenshot of your local machine. 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. This results in arbitrary command execution with the privileges of the calling process. This vulnerability is fixed in 1.15.2.","source":"cvelist"},{"lang":"en","text":"## 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"screenshot-desktop permite capturar una captura de pantalla de su equipo local. Esta vulnerabilidad se debe a un problema de inyección de comandos. Cuando se pasa una entrada controlada por el usuario a la opción de formato de la función de captura de pantalla, esta se interpola en un comando de shell sin depurar. Esto provoca la ejecución arbitraria de comandos con los privilegios del proceso que los invocó. Esta vulnerabilidad se corrigió en la versión 1.15.2.","source":"nvd"}],"published":"2025-08-19T17:34:54.656Z","modified":"2026-06-17T09:41:36.030Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-77"],"affected":[{"ranges":[{"version":"< 1.15.2","status":"affected"}],"vendor":"bencevans","product":"screenshot-desktop","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.15.2"}],"ecosystem":"npm","package":"screenshot-desktop","purl":"pkg:npm/screenshot-desktop","source":"ghsa"}],"references":[{"url":"https://github.com/bencevans/screenshot-desktop/security/advisories/GHSA-gjx4-2c7g-fm94","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bencevans/screenshot-desktop/commit/59c87b0c175eec76090e6ccde313f4fc5d569b78","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-55294","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/bencevans/screenshot-desktop","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-08-19T20:03:45.655Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-55294","url":"https://www.cve.org/CVERecord?id=CVE-2025-55294","licence":"CVE Terms of Use","modified":"2025-08-19T20:03:52.409Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gjx4-2c7g-fm94","url":"https://github.com/advisories/GHSA-gjx4-2c7g-fm94","licence":"CC-BY-4.0","modified":"2025-08-19T20:42:37.558Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-55294","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-55294","licence":"Public domain","modified":"2026-06-17T09:41:36.030Z"}],"updatedAt":"2026-11-25T22:59:02.797Z","epss":{"score":0.01422,"percentile":0.73655,"date":"2026-12-01T12:00:22.000Z"}}