CVE-2020-7782
📋 TL;DR
CVE-2020-7782 is an OS command injection vulnerability in the spritesheet-js package that allows attackers to execute arbitrary commands on the host system. All versions of spritesheet-js are affected because it depends on the vulnerable platform-command package. This impacts any application using spritesheet-js for sprite sheet generation.
💻 Affected Systems
- spritesheet-js
📦 What is this software?
Spritesheet Js by Spritesheet Js Project
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with remote code execution, allowing attackers to install malware, exfiltrate data, or pivot to other systems.
Likely Case
Arbitrary command execution leading to data theft, service disruption, or installation of cryptocurrency miners.
If Mitigated
Limited impact if proper input validation and sandboxing are implemented, potentially only affecting the spritesheet generation process.
🎯 Exploit Status
Exploitation is straightforward as the vulnerability is in a widely used package with public proof-of-concept available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Update to platform-command 0.2.1 or later
Vendor Advisory: https://github.com/krzysztof-o/spritesheet.js/security/advisories
Restart Required: Yes
Instructions:
1. Update platform-command dependency to version 0.2.1 or later
2. Update spritesheet-js package
3. Restart any running applications using spritesheet-js
4. Test sprite sheet generation functionality
🔧 Temporary Workarounds
Remove spritesheet-js dependency
allTemporarily remove or disable spritesheet-js usage until patched
npm uninstall spritesheet-js
Input validation wrapper
allImplement strict input validation for all parameters passed to spritesheet-js
🧯 If You Can't Patch
- Network segmentation to isolate systems using spritesheet-js
- Implement strict egress filtering to prevent command and control communication
🔍 How to Verify
Check if Vulnerable:
Check package.json for spritesheet-js dependency and run: npm list platform-command
Check Version:
npm list spritesheet-js && npm list platform-command
Verify Fix Applied:
Verify platform-command version is 0.2.1 or later: npm list platform-command
📡 Detection & Monitoring
Log Indicators:
- Unusual command execution patterns
- Suspicious child process creation from Node.js applications
Network Indicators:
- Unexpected outbound connections from application servers
- Command and control traffic patterns
SIEM Query:
process.name:node.exe AND process.cmdline:*spritesheet* AND process.parent.name:cmd.exe
🔗 References
- https://github.com/krzysztof-o/spritesheet.js/blob/master/lib/generator.js%23L32
- https://snyk.io/vuln/SNYK-JS-SPRITESHEETJS-1048333
- https://www.npmjs.com/package/spritesheet-js
- https://github.com/krzysztof-o/spritesheet.js/blob/master/lib/generator.js%23L32
- https://snyk.io/vuln/SNYK-JS-SPRITESHEETJS-1048333
- https://www.npmjs.com/package/spritesheet-js