RCE in OpenBSD OpenSSH
CVE-2023-51385
In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host name has shell metacharacters, and this name is referenced by an expansion token in certain situations. For example, an untrusted Git repository can have a submodule with shell metacharacters in a user name or host name.
Vulnerability class: Command Injection (OS Command Injection)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
EPSS exploit prediction
EPSS 0.198, 97.4th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- OpenBSD OpenSSH
- Debian Linux — versions 10.0, 11.0, 12.0
Weakness classification (CWE)
Public exploits and proof-of-concept code
29 public repositories with exploit or proof-of-concept code for this CVE:
- vin01/poc-proxycommand-vulnerable (50 stars, last pushed 2023-10-12): Proof of conept to exploit vulnerable proxycommand configurations on ssh clients (CVE-2023-51385)
- LtmThink/CVE-2023-51385_test (7 stars, last pushed 2024-03-17): 一个验证对CVE-2023-51385
- Le1a/CVE-2023-51385 (5 stars, last pushed 2023-12-26): OpenSSH ProxyCommand RCE
- WOOOOONG/CVE-2023-51385 (2 stars, last pushed 2024-01-02): CVE-2023-51385 PoC Exploit
- LSP1025923/cve-2023-51385 (last pushed 2026-07-06): 春秋云镜
- saarcastified/CVE-2023-51385---OpenSSH-ProxyCommand-Injection-PoC (last pushed 2025-07-29): This repository contains a proof-of-concept (PoC) for exploiting the OpenSSH ProxyCommand vulnerability — CVE-2025-51385 — affecting OpenSSH servers <9.6 Version
- GroundCTL2MajorTom/CVE-2023-51385P-POC (last pushed 2025-01-06)
- GroundCTL2MajorTom/CVE-2023-51385POC (last pushed 2025-01-06)
- Featherw1t/CVE-2023-51385_test (last pushed 2024-08-20)
- MiningBot-eth/CVE-2023-51385-exploit (last pushed 2024-06-15)
19 more are listed on the interactive page.
Also mentioned in 46 other repositories (0day404/HV-2024-POC, 12442RF/POC, AboSteam/POPC, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- www.openssh.com/txt/release-9.6 (Release Notes)
- www.openwall.com/lists/oss-security/2023/12/18/2 (Mailing List, Release Notes)
- github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829… (Patch)
- DSA-5586 (vendor-advisory, Third Party Advisory)
- vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/202… (Third Party Advisory)
- [debian-lts-announce] 20231226 [SECURITY] [DLA 3694-1] openssh security update (mailing-list, Mailing List, Third Party Advisory)
- [oss-security] 20231226 CVE-2023-51385, CVE-2023-6004: OpenSSH, libssh: Security weakness in ProxyCommand handling (mailing-list, Mailing List, Third Party Advisory)
- GLSA-202312-17 (vendor-advisory, Third Party Advisory)
- security.netapp.com/advisory/ntap-20240105-0005/
- support.apple.com/kb/HT214084
This CVE has public exploit evidence. See the latest CVEs with public exploits.