# CVE-2021-23360: Arbitrary Command Injection

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High; E: P
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 2.34% (percentile 84, 2026-11-26)
- **CWE:** CWE-78
- **Aliases:** GHSA-fc42-h7q4-qp8h, SNYK-JS-KILLPORT-1078535
- **Published:** 2021-03-21T15:45:15.917Z
- **Modified:** 2026-07-08T06:49:34.573Z

## Who should check

- Projects that depend on npm package killport (\< 1.0.2)
- Anyone running killport \>= unspecified, \< 1.0.2

## Description

This affects the package killport before 1.0.2. If (attacker-controlled) user input is given, it is possible for an attacker to execute arbitrary commands. This is due to use of the child\_process exec function without input sanitization. Running this PoC will cause the command touch success to be executed, leading to the creation of a file called success.

## Affected and fixed versions

- npm `killport`: affected \< 1.0.2; fixed 1.0.2 (osv)
- killport: \>= unspecified, \< 1.0.2 (cvelist)

## Mitigation

- Upgrade killport to 1.0.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-23360. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-23360.md
Affected: killport < 1.0.2
Fixed in: 1.0.2

Steps:
1. Search this machine and project for killport (npm), killport: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-23360 being exploited?

There is no confirmed exploitation: CVE-2021-23360 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 2.34% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-23360?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2021-23360?

killport \< 1.0.2.

### Is there a fix for CVE-2021-23360?

Yes. Fixed in 1.0.2. Upgrade killport to 1.0.2 or later.

### How do I check if I'm affected by CVE-2021-23360?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-23360>
- patch: <https://github.com/ssnau/killport/commit/bec8e371f170a12e11cd222ffc7a6e1ae9942638>
- exploit: <https://snyk.io/vuln/SNYK-JS-KILLPORT-1078535>
- other: <https://github.com/ssnau/killport/blob/5268f23ea8f152e47182b263d8f7ef20c12a9f28/index.js%23L9>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-23360>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-fc42-h7q4-qp8h> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-23360> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-23360>
