CVE-2021-23359: Code injection in port-killer
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.68919%
CWE
Published
4/13/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
port-killer | npm | <= 1.0.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems directly from using child_process.exec() with untrusted input in the port-killer module. The advisory specifically references line 19 of index.js which contains command execution logic. The PoC demonstrates that user input is interpolated into a shell command without proper sanitization, enabling arbitrary command injection through shell command concatenation. While the exact function name isn't explicitly stated in advisories, the code structure and vulnerability pattern indicate the main port-killing function using exec() with user-controlled port parameter is vulnerable.