{"id":"CVE-2025-55294","aliases":["GHSA-gjx4-2c7g-fm94"],"url":"https://o3.security/vulnerability/CVE-2025-55294","summary":"Command Injection via `format` option in screenshot-desktop","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)","published":"2025-08-19T17:34:54.656Z","modified":"2026-08-12T03:51:47.171146961Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"screenshot-desktop","fixedVersion":"1.15.2"}],"fix":{"url":"https://github.com/bencevans/screenshot-desktop/commit/59c87b0c175eec76090e6ccde313f4fc5d569b78","label":"bencevans/screenshot-desktop@59c87b0"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/55xxx/CVE-2025-55294.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/bencevans/screenshot-desktop/commit/59c87b0c175eec76090e6ccde313f4fc5d569b78"},{"type":"PACKAGE","url":"https://github.com/bencevans/screenshot-desktop"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:47.171146961Z"}}