# CVE-2020-26301: Command injection in mscdex/ssh2

> 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:N/UI:N/S:C/C:H/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 3.83% (percentile 91, 2026-11-26)
- **CWE:** CWE-78
- **Aliases:** GHSA-652h-xwhf-q4h6
- **Published:** 2021-09-20T19:40:12.000Z
- **Modified:** 2026-06-17T03:08:01.990Z

## Who should check

- Projects that depend on npm package ssh2 (\< 1.4.0)
- Anyone running mscdex ssh2 \< 1.4.0

## Description

ssh2 is client and server modules written in pure JavaScript for node.js. In ssh2 before version 1.4.0 there is a command injection vulnerability. The issue only exists on Windows. This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input. This is fixed in version 1.4.0.

## Affected and fixed versions

- npm `ssh2`: affected \< 1.4.0; fixed 1.4.0 (osv)
- mscdex ssh2: \< 1.4.0 (cvelist)

## Mitigation

- Upgrade ssh2 to 1.4.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2020-26301.md
Affected: ssh2 < 1.4.0
Fixed in: 1.4.0

Steps:
1. Search this machine and project for ssh2 (npm), mscdex ssh2: 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-2020-26301 being exploited?

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

### How serious is CVE-2020-26301?

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

### Which versions are affected by CVE-2020-26301?

ssh2 \< 1.4.0.

### Is there a fix for CVE-2020-26301?

Yes. Fixed in 1.4.0. Upgrade ssh2 to 1.4.0 or later.

### How do I check if I'm affected by CVE-2020-26301?

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-2020-26301>
- vendor: <https://securitylab.github.com/advisories/GHSL-2020-123-mscdex-ssh2>
- patch: <https://github.com/mscdex/ssh2/commit/f763271f41320e71d5cbee02ea5bc6a2ded3ca21>
- exploit: <https://securitylab.github.com/advisories/GHSL-2020-123-mscdex-ssh2/>
- other: <https://www.npmjs.com/package/ssh2>
- other: <https://github.com/mscdex/ssh2>

## 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-2020-26301>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-652h-xwhf-q4h6> (license: <https://creativecommons.org/licenses/by/4.0/>)

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