CVE-2023-51385
openssh: potential command injection via shell metacharacters
Overview
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.
Source: OX vulnerability database
Severity
6.5 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness: CWE-78
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Julia | OpenSSH_jll | <9.9.1+0 | 9.9.1+0 |
Open a package to see all its vulnerabilities.
Operating systems · 63 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | openssh | 0:9.7p1-1.azl3 |
Oracle Linux 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | pam-ssh-agent-auth | 0.10.3-7.19.0.1.el8_9.2 |
| 8 | openssh +6 | 8.0p1-19.0.1.el8_9.2 |
| 9 | pam-ssh-agent-auth | 0.10.4-5.34.el9_3.3 |
| 9 | openssh +4 | 8.7p1-34.el9_3.3 |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | openssh +3 | 8.9p1-5.ph4 |
| 5.0 | openssh +3 | 9.3p2-5.ph5 |
Red Hat 3 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | openssh +8 | eol | — |
| 8 | pam-ssh-agent-auth | 0:0.10.3-7.15.el8_6.3 | RHSA-2024:0429 |
| 8 | pam-ssh-agent-auth | 0:0.10.3-7.19.el8_8.2 | RHSA-2024:0594 |
| 8 | pam-ssh-agent-auth | 0:0.10.3-7.19.el8_9.2 | RHSA-2024:0606 |
| 8 | openssh +6 | 0:8.0p1-15.el8_6.3 | RHSA-2024:0429 |
| 8 | openssh +6 | 0:8.0p1-19.el8_8.2 | RHSA-2024:0594 |
8 more rows
SUSE Linux Enterprise 4 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | openssh-testuser | 0-81.12.1 | SUSE-SU-2024:0604-1 |
| 12.5 | openssh +3 | 7.2p2-81.12.1 | SUSE-SU-2024:0604-1 |
| 15.4 | openssh +6 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 15.5 | openssh +6 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 15.6 | openssh +7 | 9.6p1-150600.6.6.1 | SUSE-SU-2024:2393-1 |
SUSE Linux Enterprise Micro 6 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.1 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 5.2 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 5.3 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 5.4 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 5.5 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 6.0 | openssh +5 | 9.6p1-2.1 | SUSE-SU-2025:20009-1 |
alma 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | pam-ssh-agent-auth | 0.10.3-7.19.el8_9.2 |
| 8 | openssh +6 | 8.0p1-19.el8_9.2 |
| 9 | pam-ssh-agent-auth | 0.10.4-5.34.el9_3.3 |
| 9 | openssh +4 | 8.7p1-34.el9_3.3 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | openssh | 9.6_p1-r0 |
| 3.23 | openssh | 9.6_p1-r0 |
| 3.24 | openssh | 9.6_p1-r0 |
| edge | openssh | 9.6_p1-r0 |
amazon linux 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | pam-ssh-agent-auth +1 | 0.10.4-4.8.amzn2023.0.10 |
| 2023 | openssh +8 | 8.7p1-8.amzn2023.0.10 |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | openssh | 1:7.9p1-10+deb10u4 |
| 11 | openssh | 1:8.4p1-5+deb11u3 |
| 12 | openssh | 1:9.2p1-2+deb12u2 |
| 13 | openssh | 1:9.6p1-1 |
| 14 | openssh | 1:9.6p1-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| openssh | 1:9.2p1-2+deb12u2 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | openssh +7 | 9.6p1-11.1 | openSUSE-SU-2024:14113-1 |
openSUSE Leap Micro 2 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.3 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| 5.4 | openssh +4 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
rocky 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | pam-ssh-agent-auth | 0.10.3-7.19.el8_9.2 |
| 8 | openssh +6 | 8.0p1-19.el8_9.2 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-openssh | 1:8.4p1-5+deb11u3 |
| 12 | rootio-openssh | 1:9.2p1-2+deb12u2 |
| 13 | rootio-openssh | 1:9.6p1-1 |
seal Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | openssh +1 | 7.4p1-23.0.3.el7_9+sp999 |
ubuntu 6 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | openssh | 1:7.6p1-4ubuntu0.7+esm3 |
| 20.04 | openssh | 1:8.2p1-4ubuntu0.11 |
| 20.04-ESM | openssh | 1:8.2p1-4ubuntu0.11 |
| 22.04 | openssh | 1:8.9p1-3ubuntu0.6 |
| 24.04 | openssh | 1:9.6p1-3ubuntu1 |
| 26.04 | openssh | 1:9.6p1-3ubuntu1 |
References
- seclists.org http://seclists.org/fulldisclosure/2024/Mar/21
- www.openwall.com http://www.openwall.com/lists/oss-security/2023/12/26/4
- www.openwall.com http://www.openwall.com/lists/oss-security/2025/10/07/1
- www.openwall.com http://www.openwall.com/lists/oss-security/2025/10/12/1
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:1130
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-51385
- bugzilla.redhat.com https://bugzilla.redhat.com/2254210
- bugzilla.redhat.com https://bugzilla.redhat.com/2255271
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2254210
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2255271
Show all 33 references
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/html/ssa-769027.html
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/html/ssa-794697.html
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48795
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-51385
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2024-1130.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2024:0606
- github.com https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a
- linux.oracle.com https://linux.oracle.com/cve/CVE-2023-51385.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2024-12164.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-51385
- security.gentoo.org https://security.gentoo.org/glsa/202312-17
- security.netapp.com https://security.netapp.com/advisory/ntap-20240105-0005/
- support.apple.com https://support.apple.com/kb/HT214084
- ubuntu.com https://ubuntu.com/security/notices/USN-6560-2
- ubuntu.com https://ubuntu.com/security/notices/USN-6560-3
- ubuntu.com https://ubuntu.com/security/notices/USN-6565-1
- vin01.github.io https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-51385
- www.debian.org https://www.debian.org/security/2023/dsa-5586
- www.openssh.com https://www.openssh.com/txt/release-9.6
- www.openwall.com https://www.openwall.com/lists/oss-security/2023/12/18/2
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.