CVE-2019-10789
📋 TL;DR
CVE-2019-10789 is a command injection vulnerability in curling.js that allows attackers to execute arbitrary commands on the host system. The vulnerability exists because user input is passed directly to the run() function without proper sanitization. Any application using curling.js is affected.
💻 Affected Systems
- curling.js
📦 What is this software?
Curling by Curling 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 allowing remote code execution, data theft, lateral movement, and complete control of the affected server.
Likely Case
Remote code execution leading to data exfiltration, cryptocurrency mining, or deployment of additional malware.
If Mitigated
Limited impact if proper input validation and command sanitization are implemented, potentially preventing exploitation.
🎯 Exploit Status
Exploitation is straightforward as it requires only user-controlled input to the vulnerable function.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Not version-specific - requires code changes
Vendor Advisory: https://github.com/hgarcia/curling/security/advisories
Restart Required: No
Instructions:
1. Update curling.js to a secure version if available. 2. If no patched version exists, modify the code to sanitize user input before passing to run(). 3. Implement proper input validation and use parameterized commands.
🔧 Temporary Workarounds
Input Sanitization
allImplement strict input validation and sanitization for all user inputs passed to the run() function.
Remove curling.js
allReplace curling.js with alternative libraries that don't have command injection vulnerabilities.
🧯 If You Can't Patch
- Implement network segmentation to isolate affected systems
- Deploy application firewalls with command injection detection rules
🔍 How to Verify
Check if Vulnerable:
Check if your application uses curling.js and if user input is passed to the run() function without sanitization.
Check Version:
Check package.json or npm list for curling.js version
Verify Fix Applied:
Verify that user input is properly sanitized before being passed to the run() function and test with malicious inputs.
📡 Detection & Monitoring
Log Indicators:
- Unusual command execution patterns
- Suspicious curl commands with unexpected parameters
Network Indicators:
- Outbound connections to unexpected destinations following curl execution
SIEM Query:
Process execution where command contains 'curl' with unusual parameters or user input
🔗 References
- https://github.com/hgarcia/curling/blob/e861d625c074679a2931bcf4ce8da0afa8162c53/lib/curl-transport.js#L56
- https://snyk.io/vuln/SNYK-JS-CURLING-546484
- https://github.com/hgarcia/curling/blob/e861d625c074679a2931bcf4ce8da0afa8162c53/lib/curl-transport.js#L56
- https://snyk.io/vuln/SNYK-JS-CURLING-546484