CVE-2019-15609

9.8 CRITICAL

📋 TL;DR

The kill-port-process npm package before version 2.2.0 contains a command injection vulnerability that allows attackers to execute arbitrary commands on the host system. This affects any application using vulnerable versions of this package, particularly Node.js applications that rely on it for port management.

💻 Affected Systems

Products:
  • kill-port-process npm package
Versions: All versions < 2.2.0
Operating Systems: All platforms where Node.js runs (Linux, Windows, macOS)
Default Config Vulnerable: ⚠️ Yes
Notes: Any Node.js application importing and using kill-port-process functions with untrusted input is vulnerable.

📦 What is this software?

⚠️ 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

Local privilege escalation or remote code execution in applications that accept user input passed to kill-port-process functions.

🟢

If Mitigated

Limited impact if proper input validation and sandboxing are implemented, though the vulnerability remains present.

🌐 Internet-Facing: HIGH - Web applications using this package could allow remote attackers to execute commands if user input reaches vulnerable functions.
🏢 Internal Only: MEDIUM - Internal applications could be exploited by authenticated users or through other attack vectors.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation is straightforward - attackers can inject shell commands through parameters passed to kill-port-process functions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.2.0

Vendor Advisory: https://www.npmjs.com/advisories/1184

Restart Required: No

Instructions:

1. Update kill-port-process to version 2.2.0 or later using 'npm update kill-port-process'. 2. Verify the update with 'npm list kill-port-process'. 3. Test application functionality after update.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation for any parameters passed to kill-port-process functions

Remove or replace package

all

Remove kill-port-process dependency and use alternative port management solutions

npm uninstall kill-port-process

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate affected systems
  • Deploy application-level firewalls to monitor and block suspicious command execution attempts

🔍 How to Verify

Check if Vulnerable:

Check package.json or run 'npm list kill-port-process' to see if version is below 2.2.0

Check Version:

npm list kill-port-process | grep kill-port-process

Verify Fix Applied:

Run 'npm list kill-port-process' and confirm version is 2.2.0 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unusual process spawns from Node.js applications
  • Suspicious command execution patterns in application logs

Network Indicators:

  • Unexpected outbound connections from Node.js processes
  • Command and control traffic patterns

SIEM Query:

process.name:node AND (process.cmdline:*kill-port-process* OR process.cmdline:*sh* OR process.cmdline:*cmd*)

🔗 References

📤 Share & Export