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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | openssh | 1:9.6p1-1 | — |
| Debian 13 | openssh | 1:9.6p1-1 | — |
| Debian 12 | openssh | 1:9.2p1-2+deb12u2 | DSA-5586-1 |
| Debian 11 | openssh | 1:8.4p1-5+deb11u3 | DSA-5586-1 |
| Debian 10 | openssh | 1:7.9p1-10+deb10u4 | DLA-3694-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | openssh-ssh1 | No fix yet | — |
| Ubuntu 26.04 LTS | openssh-ssh1 | No fix yet | — |
| Ubuntu 25.10 | openssh-ssh1 | No fix yet | — |
| Ubuntu 24.04 LTS | openssh | 1:9.6p1-3ubuntu1 | — |
| Ubuntu 24.04 LTS | openssh-ssh1 | No fix yet | — |
| Ubuntu 22.04 LTS | openssh | 1:8.9p1-3ubuntu0.6 | USN-6565-1 |
| Ubuntu 22.04 LTS | openssh-ssh1 | No fix yet | — |
Show 11 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | openssh | 1:8.2p1-4ubuntu0.11 | USN-6565-1 |
| Ubuntu 20.04 LTS | openssh-ssh1 | No fix yet | — |
| Ubuntu 18.04 LTS | openssh-ssh1 | No fix yet | — |
| Ubuntu Pro FIPS 20.04 LTS | openssh | No fix yet | — |
| Ubuntu Pro FIPS 18.04 LTS | openssh | No fix yet | — |
| Ubuntu Pro FIPS 16.04 LTS | openssh | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | openssh | 1:8.2p1-4ubuntu0.fips.0.11 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | openssh | 1:7.9p1-10~ubuntu18.04.fips.0.9 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | openssh | 1:7.2p2-4ubuntu2.fips.2.10.6 | — |
| Ubuntu Pro 18.04 LTS | openssh | 1:7.6p1-4ubuntu0.7+esm3 | USN-6560-2 |
| Ubuntu Pro 16.04 LTS | openssh | 1:7.2p2-4ubuntu2.10+esm6 | USN-6560-3, USN-6560-2 |
| Ubuntu Pro 14.04 LTS | openssh | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | openssh +4 | 8.7p1-34.el9_3.3 | RHSA-2024:1130 |
| RHEL 9 | pam_ssh_agent_auth | 0.10.4-5.34.el9_3.3 | RHSA-2024:1130 |
| RHEL 8 | openssh +6 | 8.0p1-19.el8_9.2 | RHSA-2024:0606 |
| RHEL 8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_9.2 | RHSA-2024:0606 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9.2 EUS | openssh +4 | 8.7p1-30.el9_2.3 | RHSA-2024:0455 |
| RHEL 9.2 EUS | pam_ssh_agent_auth | 0.10.4-5.30.el9_2.3 | RHSA-2024:0455 |
| RHEL 9.0 E4S | openssh +4 | 8.7p1-13.el9_0.1 | RHSA-2026:1790 |
| RHEL 9.0 E4S | pam_ssh_agent_auth | 0.10.4-4.13.el9_0.4 | RHSA-2026:1790 |
| RHEL 8.8 EUS | openssh +6 | 8.0p1-19.el8_8.2 | RHSA-2024:0594 |
| RHEL 8.8 EUS | pam_ssh_agent_auth | 0.10.3-7.19.el8_8.2 | RHSA-2024:0594 |
| RHEL 8.6 EUS | openssh +6 | 8.0p1-15.el8_6.3 | RHSA-2024:0429 |
| RHEL 8.6 EUS | pam_ssh_agent_auth | 0.10.3-7.15.el8_6.3 | RHSA-2024:0429 |
| RHEL 8.4 EUS Long Life | openssh +2 | 8.0p1-7.el8_4.2 | RHSA-2026:22329 |
| RHEL 8.4 AUS | openssh +2 | 8.0p1-7.el8_4.2 | RHSA-2026:22329 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | openssh +4 | 8.7p1-34.el9_3.3 | ALSA-2024:1130 |
| AlmaLinux 9 | pam_ssh_agent_auth | 0.10.4-5.34.el9_3.3 | ALSA-2024:1130 |
| AlmaLinux 8 | openssh +6 | 8.0p1-19.el8_9.2 | ALSA-2024:0606 |
| AlmaLinux 8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_9.2 | ALSA-2024:0606 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | openssh | 8.0p1-19.el8_9.2 | RLSA-2024:0606 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | openssh +1 | 9.6p1-150600.6.6.1 | SUSE-SU-2024:2393-1 |
| SLES 15 SP5 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLES 15 SP4 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLES 15 SP3 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLES 15 SP2 | openssh +1 | 8.1p1-150200.5.46.1 | SUSE-SU-2024:0603-1 |
Show 17 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP5 | openssh +1 | 7.2p2-81.12.1 | SUSE-SU-2024:0604-1 |
| SLES 12 SP5 | openssh-testuser | 0-81.12.1 | SUSE-SU-2024:0604-1 |
| SLES for SAP 15 SP4 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLES for SAP 15 SP3 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLES for SAP 15 SP2 | openssh +1 | 8.1p1-150200.5.46.1 | SUSE-SU-2024:0603-1 |
| SLES for SAP 12 SP5 | openssh +1 | 7.2p2-81.12.1 | SUSE-SU-2024:0604-1 |
| SLE Micro 6.0 | openssh | 9.6p1-2.1 | SUSE-SU-2025:20009-1 |
| SLE Micro 5.5 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE Micro 5.4 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE Micro 5.3 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE Micro 5.2 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE Micro 5.1 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE HPC 15 SP4 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE HPC 15 SP3 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SLE HPC 15 SP2 | openssh +1 | 8.1p1-150200.5.46.1 | SUSE-SU-2024:0603-1 |
| SUSE Manager Server 4.3 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SUSE Manager Proxy 4.3 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| SUSE Enterprise Storage 7.1 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | openssh | 9.6p1-11.1 | openSUSE-SU-2024:14113-1 |
| openSUSE Leap 15.6 | openssh +1 | 9.6p1-150600.6.6.1 | SUSE-SU-2024:2393-1 |
| openSUSE Leap 15.5 | openssh +1 | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.4 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
| openSUSE Leap Micro 5.3 | openssh | 8.4p1-150300.3.30.1 | SUSE-SU-2024:0596-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | openssh | 9.6_p1-r0 | — |
| Alpine v3.23 | openssh | 9.6_p1-r0 | — |
| Alpine v3.22 | openssh | 9.6_p1-r0 | — |
| Alpine v3.21 | openssh | 9.6_p1-r0 | — |
| Alpine v3.20 | openssh | 9.6_p1-r0 | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | openssh | 9.6_p1-r0 | — |
| Alpine v3.17 | openssh | 9.1_p1-r5 | — |
| Alpine v3.16 | openssh | 9.0_p1-r5 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | openssh +3 | 8.7p1-8.amzn2023.0.10 | ALAS2023-2024-570 |
| Amazon Linux 2023 | pam_ssh_agent_auth | 0.10.4-4.8.amzn2023.0.10 | ALAS2023-2024-570 |
| Amazon Linux 2 | openssh +7 | 7.4p1-22.amzn2.0.7 | ALAS2-2024-2507 |
| Amazon Linux 2 | pam_ssh_agent_auth | 0.10.3-2.22.amzn2.0.7 | ALAS2-2024-2507 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | openssh | 9.7p1-1 | — |
| Azure Linux 2 (CBL-Mariner) | openssh | 8.9p1-3 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | openssh +4 | 8.7p1-34.el9_3.3 | ELSA-2024-1130 |
| Oracle Linux 9 | pam_ssh_agent_auth | 0.10.4-5.34.el9_3.3 | ELSA-2024-1130 |
| Oracle Linux 8 | openssh +6 | 8.0p1-19.0.1.el8_9.2 | ELSA-2024-12164 |
| Oracle Linux 8 | pam_ssh_agent_auth | 0.10.3-7.19.0.1.el8_9.2 | ELSA-2024-12164 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 23 repositories · most starred shown
-
vin01/poc-proxycommand-vulnerable ★ 50 · Sep 28, 2023
Proof of conept to exploit vulnerable proxycommand configurations on ssh clients (CVE-2023-51385)
-
LtmThink/CVE-2023-51385_test ★ 7 · Dec 25, 2023
一个验证对CVE-2023-51385
-
Le1a/CVE-2023-51385 ★ 5 · Dec 25, 2023
OpenSSH ProxyCommand RCE
-
WOOOOONG/CVE-2023-51385 ★ 2 · Jan 2, 2024
CVE-2023-51385 PoC Exploit
-
julienbrs/exploit-CVE-2023-51385 ★ 0 · Jan 3, 2024
-
julienbrs/malicious-exploit-CVE-2023-51385 ★ 0 · Jan 3, 2024
-
power1314520/CVE-2023-51385_test ★ 0 · Dec 30, 2023
一个验证对CVE-2023-51385
-
WLaoDuo/CVE-2023-51385_poc-test ★ 0 · Dec 26, 2023
CVE-2023-51385;OpenSSH ProxyCommand RCE;OpenSSH <9.6 命令注入漏洞poc
-
FeatherStark/CVE-2023-51385 ★ 0 · Dec 25, 2023
-
watarium/poc-cve-2023-51385 ★ 0 · Dec 25, 2023
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 44
- ALSA-2024:1130 Moderate: openssh security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2024:0606 Moderate: openssh security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2024:1130 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:0594 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:0606 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:0429 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:0455 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- SSA-082556 SSA-082556: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP V3.1.5 Siemens ProductCERT · Oct 13, 2026
- SSA-794697 SSA-794697: Vulnerabilities in the Additional GNU/Linux Subsystem of the SIMATIC S7-1500 TM MFP Before V1.1 Siemens ProductCERT · Oct 13, 2026
- RHSA-2026:22329 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Oct 3, 2026
- RHSA-2026:1790 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Sep 2, 2026
- WID-SEC-2023-3182 OpenSSH: Mehrere Schwachstellen ermöglichen Offenlegung von Informationen BSI CERT-Bund (WID) · Jul 13, 2026
- USN-6560-2 openssh vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-6560-3 openssh vulnerability Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-6565-1 openssh vulnerabilities Ubuntu Security Notices (USN) · May 29, 2026
- ICSA-25-162-05 Siemens SIMATIC S7-1500 CPU family CISA ICS & IT advisories · May 14, 2026
- SUSE-SU-2025:20009-1 Security update for openssh SUSE / openSUSE Security Updates · Mar 23, 2026
- DSA-5586-1 openssh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3694-1 openssh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2024:0606 Moderate: openssh security update Rocky Linux Security Advisories · Feb 4, 2026
- openSUSE-SU-2024:14113-1 openssh-9.6p1-11.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2393-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0604-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0603-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- NCSC-2025-0187 Kwetsbaarheden verholpen in Siemens producten NCSC-NL (Netherlands) · Jun 10, 2025
- VDE-2024-073 Phoenix Contact: Multiple Vulnerabilities in PLCnext Firmware CERT@VDE · May 22, 2025
- ICSA-25-044-09 Siemens SCALANCE W700 IEEE 802.11ax CISA ICS & IT advisories · May 6, 2025
- SUSE-SU-2024:0596-1 Security update for openssh SUSE / openSUSE Security Updates · May 2, 2025
- NCSC-2025-0061 Kwetsbaarheden verholpen in Siemens producten NCSC-NL (Netherlands) · Feb 14, 2025
- NCSC-2025-0051 Kwetsbaarheden verholpen in Siemens producten NCSC-NL (Netherlands) · Feb 11, 2025
- SSA-769027 SSA-769027: Multiple Vulnerabilities fixed in SCALANCE W700 IEEE 802.11ax devices before V3.0.0 Siemens ProductCERT · Feb 11, 2025
- WID-SEC-2024-3140 Juniper JUNOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 8, 2025
- WID-SEC-2024-0578 Apple macOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 6, 2025
- WID-SEC-2024-1248 Xerox FreeFlow Print Server: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 21, 2024
- NCSC-2024-0411 Kwetsbaarheden verholpen in Oracle Database producten NCSC-NL (Netherlands) · Oct 17, 2024
- NCSC-2024-0325 Kwetsbaarheden verholpen in Aruba Networks ArubaOS en InstantOS NCSC-NL (Netherlands) · Aug 7, 2024
- WID-SEC-2024-1781 Aruba ArubaOS: Mehrere Schwachstellen ermöglichen Codeausführung und DOS BSI CERT-Bund (WID) · Aug 6, 2024
- WID-SEC-2024-1701 Aruba EdgeConnect: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jul 23, 2024
- WID-SEC-2024-1082 Juniper JUNOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · May 9, 2024
- ICSA-23-166-11 Siemens SIMATIC S7-1500 TM MFP Linux Kernel CISA ICS & IT advisories · Apr 9, 2024
- ALAS2-2024-2507 Moderate: openssh security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Mar 27, 2024
- ALAS2023-2024-570 Moderate: openssh security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Mar 21, 2024
- ELSA-2024-1130 Moderate: openssh security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Mar 6, 2024
- ELSA-2024-12164 Moderate: openssh security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Feb 14, 2024
References
- 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
- DSA-5586 vendor-advisory
- https://vin01.github.io/piptagole/ssh/security/openssh/libssh/remote-code-execution/2023/12/20/openssh-proxycommand-libssh-rce.html
- [debian-lts-announce] 20231226 [SECURITY] [DLA 3694-1] openssh security update mailing-list
- [oss-security] 20231226 CVE-2023-51385, CVE-2023-6004: OpenSSH, libssh: Security weakness in ProxyCommand handling mailing-list
- GLSA-202312-17 vendor-advisory
- https://security.netapp.com/advisory/ntap-20240105-0005/
- https://support.apple.com/kb/HT214084
- 20240313 APPLE-SA-03-07-2024-2 macOS Sonoma 14.4 mailing-list