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.
Fix
Public exploits 23
- 2048JiaLi/CVE-2023-51385 PoC on GitHub
- FeatherStark/CVE-2023-51385 PoC on GitHub
- Featherw1t/CVE-2023-51385_test PoC on GitHub
- GroundCTL2MajorTom/CVE-2023-51385P-POC PoC on GitHub
- GroundCTL2MajorTom/CVE-2023-51385POC PoC on GitHub
- LSP1025923/cve-2023-51385 PoC on GitHub
- Le1a/CVE-2023-51385 PoC on GitHub
- LtmThink/CVE-2023-51385_test PoC on GitHub
- MiningBot-eth/CVE-2023-51385-exploit PoC on GitHub
- Sonicrrrr/CVE-2023-51385 PoC on GitHub
- WLaoDuo/CVE-2023-51385_poc-test PoC on GitHub
- WOOOOONG/CVE-2023-51385 PoC on GitHub
- c0deur/CVE-2023-51385 PoC on GitHub
- endasugrue/CVE-2023-51385_poc PoC on GitHub
- farliy-hacker/CVE-2023-51385 PoC on GitHub
- farliy-hacker/CVE-2023-51385-save PoC on GitHub
- julienbrs/exploit-CVE-2023-51385 PoC on GitHub
- julienbrs/malicious-exploit-CVE-2023-51385 PoC on GitHub
- power1314520/CVE-2023-51385_test PoC on GitHub
- saarcastified/CVE-2023-51385---OpenSSH-ProxyCommand-Injection-PoC PoC on GitHub
- and 3 more
Each line links to the index that lists it, never to exploit code. Exploit-DB's "verified" and a Metasploit rank of good or better count as verified; a PoC-in-GitHub entry is a repository's claim.
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Patch
- https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Patch
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 6.5 · openbsd, debianNVD modified 2026-10-15 01:17
Affected (CPE criteria) 4
cpe:2.3:a:openbsd:openssh:*:*:*:*:*:*:*:*cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*cpe:2.3:o:debian:debian_linux:12.0:*:*:*:*:*:*:*
References 27
- http://seclists.org/fulldisclosure/2024/Mar/21
- http://www.openwall.com/lists/oss-security/2023/12/26/4 Mailing List, Third Party Advisory
- https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Patch
- https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html Mailing List, Third Party Advisory
- https://security.gentoo.org/glsa/202312-17 Third Party Advisory
- https://security.netapp.com/advisory/ntap-20240105-0005/
- https://support.apple.com/kb/HT214084
- https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html Third Party Advisory
- https://www.debian.org/security/2023/dsa-5586 Third Party Advisory
- https://www.openssh.com/txt/release-9.6 Release Notes
- https://www.openwall.com/lists/oss-security/2023/12/18/2 Mailing List, Release Notes
- http://seclists.org/fulldisclosure/2024/Mar/21
- http://www.openwall.com/lists/oss-security/2023/12/26/4 Mailing List, Third Party Advisory
- http://www.openwall.com/lists/oss-security/2025/10/07/1
- http://www.openwall.com/lists/oss-security/2025/10/12/1
- https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a Patch
- https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html Mailing List, Third Party Advisory
- https://security.gentoo.org/glsa/202312-17 Third Party Advisory
- https://security.netapp.com/advisory/ntap-20240105-0005/
- https://support.apple.com/kb/HT214084
- https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html Third Party Advisory
- https://www.debian.org/security/2023/dsa-5586 Third Party Advisory
- https://www.openssh.com/txt/release-9.6 Release Notes
- https://www.openwall.com/lists/oss-security/2023/12/18/2 Mailing List, Release Notes
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- https://cert-portal.siemens.com/productcert/html/ssa-769027.html
- https://cert-portal.siemens.com/productcert/html/ssa-794697.html