Skip to content
OpenAdvisories
Medium · 6.5 Public exploit CVE-2023-51385 EUVD-2023-56106GHSA-5mq4-x9g5-4vc4

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 refer…

Published Dec 18, 2023 · Updated Oct 15, 2026 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 ↗
ReleasePackageFixed inAdvisory
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 ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 openssh 8.0p1-19.el8_9.2 RLSA-2024:0606
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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

ReleasePackageFixed inAdvisory
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

ReleasePackageFixed inAdvisory
Azure Linux 3 openssh 9.7p1-1 —
Azure Linux 2 (CBL-Mariner) openssh 8.9p1-3 —

Oracle Linux

ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 23 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 44

References