CVE-2023-51385
Vulnerability Summary
Timeline
Description
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.
CVSS Metrics
- v3.1•MEDIUM•Score: 6.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Trends
Current EPSS score: 19.75%• Percentile: 97%
Techniques & Countermeasures
- CWE-78•Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Affected Systems
- alpine•openssh
< 9.0_p1-r5 | < 9.1_p1-r5 | < 9.6_p1-r0 | < 9.6_p1-r0 | < 9.6_p1-r0 | < 9.6_p1-r0 | < 9.6_p1-r0 | < 9.6_p1-r0
- debian•openssh
< 1:8.4p1-5+deb11u3 | < 1:9.2p1-2+deb12u2 | < 1:9.6p1-1 | < 1:9.6p1-1
- ubuntu•openssh
all | < 1:7.2p2-4ubuntu2.10+esm6 | < 1:7.2p2-4ubuntu2.fips.2.10.6 | < 1:7.6p1-4ubuntu0.7+esm3 | < 1:7.9p1-10~ubuntu18.04.fips.0.9 | < 1:8.2p1-4ubuntu0.11 | < 1:8.2p1-4ubuntu0.fips.0.11 | < 1:8.9p1-3ubuntu0.6 | < 1:9.6p1-3ubuntu1
- ubuntu•openssh-ssh1
all | all | all | all | all | all
- debian•debian_linux
10.0 | 11.0 | 12.0
- openbsd•openssh
< 9.6
References (23)
- https://www.openssh.com/txt/release-9.6
- https://www.openwall.com/lists/oss-security/2023/12/18/2
- https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a
- https://www.debian.org/security/2023/dsa-5586
- https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html
- https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html
- http://www.openwall.com/lists/oss-security/2023/12/26/4
- https://security.gentoo.org/glsa/202312-17
- https://security.netapp.com/advisory/ntap-20240105-0005/
- https://support.apple.com/kb/HT214084
- http://seclists.org/fulldisclosure/2024/Mar/21
- http://www.openwall.com/lists/oss-security/2025/10/07/1
- http://www.openwall.com/lists/oss-security/2025/10/12/1
- https://cert-portal.siemens.com/productcert/html/ssa-794697.html
- https://cert-portal.siemens.com/productcert/html/ssa-769027.html
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- https://security.alpinelinux.org/vuln/CVE-2023-51385
- https://security-tracker.debian.org/tracker/CVE-2023-51385
- https://ubuntu.com/security/CVE-2023-51385
- https://ubuntu.com/security/notices/USN-6565-1
- https://ubuntu.com/security/notices/USN-6560-2
- https://www.cve.org/CVERecord?id=CVE-2023-51385
- https://ubuntu.com/security/notices/USN-6560-3