Description
The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remote code execution if an agent is forwarded to an attacker-controlled system. (Code in /usr/lib is not necessarily safe for loading into ssh-agent.) NOTE: this issue exists because of an incomplete fix for CVE-2016-10009.
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.3p2-1 | — |
| Debian 13 | openssh | 1:9.3p2-1 | — |
| Debian 12 | openssh | 1:9.2p1-2+deb12u1 | — |
| Debian 10 | openssh | 1:7.9p1-10+deb10u3 | DLA-3532-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-ssh1 | No fix yet | — |
| Ubuntu 22.04 LTS | openssh | 1:8.9p1-3ubuntu0.3 | USN-6242-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.8 | USN-6242-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.8 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | openssh | 1:7.9p1-10~ubuntu18.04.fips.0.8 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | openssh | 1:7.2p2-4ubuntu2.fips.2.10.4 | — |
| Ubuntu Pro 18.04 LTS | openssh | 1:7.6p1-4ubuntu0.7+esm1 | USN-6242-2 |
| Ubuntu Pro 16.04 LTS | openssh | 1:7.2p2-4ubuntu2.10+esm3 | USN-6242-2 |
| Ubuntu Pro 14.04 LTS | openssh | 1:6.6p1-2ubuntu2.13+esm1 | USN-6242-2 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | openssh +4 | 8.7p1-30.el9_2 | RHSA-2023:4412 |
| RHEL 9 | pam_ssh_agent_auth | 0.10.4-5.30.el9_2 | RHSA-2023:4412 |
| RHEL 8 | openssh +6 | 8.0p1-19.el8_8 | RHSA-2023:4419 |
| RHEL 8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_8 | RHSA-2023:4419 |
| RHEL 7 | openssh +7 | 7.4p1-23.el7_9 | RHSA-2023:4382 |
| RHEL 7 | pam_ssh_agent_auth | 0.10.3-2.23.el7_9 | RHSA-2023:4382 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9.0 EUS | openssh +4 | 8.7p1-11.el9_0 | RHSA-2023:4329 |
| RHEL 9.0 EUS | pam_ssh_agent_auth | 0.10.4-4.11.el9_0 | RHSA-2023:4329 |
| RHEL 8.6 EUS | openssh +6 | 8.0p1-15.el8_6 | RHSA-2023:4413 |
| RHEL 8.6 EUS | pam_ssh_agent_auth | 0.10.3-7.15.el8_6 | RHSA-2023:4413 |
| RHEL 8.4 TUS | openssh +6 | 8.0p1-7.el8_4 | RHSA-2023:4381 |
| RHEL 8.4 TUS | pam_ssh_agent_auth | 0.10.3-7.7.el8_4.1 | RHSA-2023:4381 |
| RHEL 8.4 E4S | openssh +6 | 8.0p1-7.el8_4 | RHSA-2023:4381 |
| RHEL 8.4 E4S | pam_ssh_agent_auth | 0.10.3-7.7.el8_4.1 | RHSA-2023:4381 |
| RHEL 8.4 AUS | openssh +6 | 8.0p1-7.el8_4 | RHSA-2023:4381 |
| RHEL 8.4 AUS | pam_ssh_agent_auth | 0.10.3-7.7.el8_4.1 | RHSA-2023:4381 |
| RHEL 8.2 TUS | openssh +6 | 8.0p1-5.el8_2 | RHSA-2023:4384 |
| RHEL 8.2 TUS | pam_ssh_agent_auth | 0.10.3-7.5.el8_2 | RHSA-2023:4384 |
| RHEL 8.2 E4S | openssh +6 | 8.0p1-5.el8_2 | RHSA-2023:4384 |
| RHEL 8.2 E4S | pam_ssh_agent_auth | 0.10.3-7.5.el8_2 | RHSA-2023:4384 |
| RHEL 8.2 AUS | openssh +6 | 8.0p1-5.el8_2 | RHSA-2023:4384 |
| RHEL 8.2 AUS | pam_ssh_agent_auth | 0.10.3-7.5.el8_2 | RHSA-2023:4384 |
| RHEL 8.1 E4S | openssh +6 | 8.0p1-5.el8_1.1 | RHSA-2023:4383 |
| RHEL 8.1 E4S | pam_ssh_agent_auth | 0.10.3-7.5.el8_1 | RHSA-2023:4383 |
| RHEL 6 ELS | openssh +4 | 5.3p1-125.el6_10 | RHSA-2023:4428 |
| RHEL 6 ELS | pam_ssh_agent_auth | 0.9.3-125.el6_10 | RHSA-2023:4428 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | openssh +4 | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux 9 | pam_ssh_agent_auth | 0.10.4-5.30.el9_2 | ALSA-2023:4412 |
| AlmaLinux 8 | openssh +6 | 8.0p1-19.el8_8 | ALSA-2026:69266, ALSA-2023:4419 |
| AlmaLinux 8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_8 | ALSA-2026:69266, ALSA-2023:4419 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | openssh | 8.0p1-19.el8_8 | RLSA-2023:4419 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLES 15 SP4 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLES 15 SP3 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLES 15 SP2 | openssh +1 | 8.1p1-150200.5.37.1 | SUSE-SU-2023:2946-1 |
| SLES 15 SP1 | openssh +1 | 7.9p1-150100.6.31.1 | SUSE-SU-2023:2947-1 |
Show 18 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP5 | openssh +1 | 7.2p2-81.4.2 | SUSE-SU-2023:2950-1 |
| SLES 12 SP2 | openssh +1 | 7.2p2-74.63.1 | SUSE-SU-2023:2940-1 |
| SLES for SAP 15 SP3 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLES for SAP 15 SP2 | openssh +1 | 8.1p1-150200.5.37.1 | SUSE-SU-2023:2946-1 |
| SLES for SAP 15 SP1 | openssh +1 | 7.9p1-150100.6.31.1 | SUSE-SU-2023:2947-1 |
| SLES for SAP 12 SP5 | openssh +1 | 7.2p2-81.4.2 | SUSE-SU-2023:2950-1 |
| SLE Real Time 15 SP3 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE Micro 5.4 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE Micro 5.3 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE Micro 5.2 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE Micro 5.1 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE HPC 15 SP3 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SLE HPC 15 SP2 | openssh +1 | 8.1p1-150200.5.37.1 | SUSE-SU-2023:2946-1 |
| SLE HPC 15 SP1 | openssh +1 | 7.9p1-150100.6.31.1 | SUSE-SU-2023:2947-1 |
| SUSE Manager Server 4.2 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SUSE Manager Proxy 4.2 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SUSE Enterprise Storage 7.1 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| SUSE Enterprise Storage 7 | openssh +1 | 8.1p1-150200.5.37.1 | SUSE-SU-2023:2946-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | openssh | 9.3p2-1.1 | openSUSE-SU-2024:13063-1 |
| openSUSE Leap 15.5 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
| openSUSE Leap 15.4 | openssh +1 | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.3 | openssh | 8.4p1-150300.3.22.1 | SUSE-SU-2023:2945-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.17 | openssh | 9.1_p1-r4 | — |
| Alpine v3.16 | openssh | 9.0_p1-r4 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | openssh +3 | 8.7p1-8.amzn2023.0.7 | ALAS2023-2023-273 |
| Amazon Linux 2023 | pam_ssh_agent_auth | 0.10.4-4.8.amzn2023.0.7 | ALAS2023-2023-273 |
| Amazon Linux 2 | openssh +7 | 7.4p1-22.amzn2.0.3 | ALAS2-2023-2176 |
| Amazon Linux 2 | pam_ssh_agent_auth | 0.10.3-2.22.amzn2.0.3 | ALAS2-2023-2176 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | openssh | 8.9p1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | openssh +4 | 8.7p1-30.el9_2 | ELSA-2023-4412 |
| Oracle Linux 9 | pam_ssh_agent_auth | 0.10.4-5.30.el9_2 | ELSA-2023-4412 |
| Oracle Linux 8 | openssh +6 | 8.0p1-19.el8_8 | ELSA-2023-4419 |
| Oracle Linux 8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_8 | ELSA-2023-4419 |
| Oracle Linux 7 | openssh +7 | 7.4p1-23.0.1.el7_9 | ELSA-2023-12711, ELSA-2023-4382 |
| Oracle Linux 7 | pam_ssh_agent_auth | 0.10.3-2.23.0.1.el7_9 | ELSA-2023-12711, ELSA-2023-4382 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | openssh | 9.3_p2-r0 | — |
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 10 repositories
-
kali-mx/CVE-2023-38408 ★ 53 · Aug 9, 2023
PoC for the recent critical vuln affecting OpenSSH versions < 9.3p2
-
LucasPDiniz/CVE-2023-38408 ★ 45 · Nov 9, 2023
Takeover Account OpenSSH
-
TX-One/CVE-2023-38408 ★ 7 · Apr 19, 2025
CVE-2023-38408 SSH Vulnerability Scanner & PoC
-
Adel2411/cve-2023-38408 ★ 5 · Jul 16, 2025
An in-depth analysis of CVE 2023 38408, a critical OpenSSH vulnerability, including technical background, exploitation in controlled environments, and mitigation strategies.
-
classic130/CVE-2023-38408 ★ 3 · Jan 7, 2024
CVE-2023-38408 Remote Code Execution in OpenSSH's forwarded ssh-agent
-
mrtacojr/CVE-2023-38408 ★ 1 · Jul 17, 2024
Script para eliminar vulnerabilidad de openssh de ubuntu 22.04 LTS
-
nonosticisiguzo-command/nmap-scan-results ★ 0 · Apr 12, 2026
Found 200+ vulnerabilities on scanme.nmap.org including CVE-2023-38408 (9.8 critical)
-
xitexploiter96-dot/CVE-2023-38408 ★ 0 · Jan 24, 2026
-
fazilbaig1/cve_2023_38408_scanner ★ 0 · Oct 17, 2024
Vulnerability Overview CVE-2023-38408 affects OpenSSH versions < 9.3p2 and stems from improper validation of data when SSH agent forwarding is enabled. When users connect to a remote server with ssh …
-
wxrdnx/CVE-2023-38408 ★ 0 · Feb 16, 2024
Slide and source code for CS-782 attack presentation
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 44
- ALSA-2023:4412 Important: openssh security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2026:69266 Important: openssh security, bug fix, and enhancement update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2023:4419 Important: openssh security update AlmaLinux Security Advisories · Oct 29, 2026
- SSA-398330 SSA-398330: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP >= V3.1.0 and < V3.1.5 Siemens ProductCERT · Oct 13, 2026
- WID-SEC-2023-1819 OpenSSH: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Sep 23, 2026
- WID-SEC-2024-3195 Oracle Communications: Mehrere Schwachstellen BSI CERT-Bund (WID) · Aug 11, 2026
- USN-6242-2 openssh vulnerability Ubuntu Security Notices (USN) · Jun 29, 2026
- RHSA-2023:4384 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4382 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4413 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4329 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4428 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4381 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4383 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4412 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2023:4419 Red Hat Security Advisory: openssh security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-6242-1 openssh vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-3532-1 openssh - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2023:4419 Important: openssh security update Rocky Linux Security Advisories · Feb 5, 2026
- SUSE-SU-2023:2946-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2023:2940-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:13063-1 openssh-9.3p2-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2023:2945-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2023:2947-1 Security update for openssh SUSE / openSUSE Security Updates · Feb 4, 2026
- SCA-2025-0011 Vulnerabilities affecting Endress+Hauser SSG-E210GC SICK PSIRT · Oct 2, 2025
- ICSA-23-348-10 Siemens SIMATIC S7-1500 CISA ICS & IT advisories · Aug 12, 2025
- WID-SEC-2023-2625 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Aug 6, 2025
- SCA-2025-0009 Vulnerabilities affecting SICK TDC-E210GC SICK PSIRT · Aug 1, 2025
- SUSE-SU-2023:2950-1 Security update for openssh SUSE / openSUSE Security Updates · May 2, 2025
- WID-SEC-2024-0064 Juniper Produkte: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 10, 2025
- ICSA-25-105-08 ABB M2M Gateway CISA ICS & IT advisories · Apr 7, 2025
- 2NGA002579 ABB Arctic communication solution ARM600 Vulnerabilities ABB PSIRT · Apr 7, 2025
- WID-SEC-2024-1248 Xerox FreeFlow Print Server: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 21, 2024
- NCSC-2024-0414 Kwetsbaarheden verholpen in Oracle Communications NCSC-NL (Netherlands) · Oct 17, 2024
- WID-SEC-2024-1082 Juniper JUNOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · May 9, 2024
- WID-SEC-2023-2679 Oracle Communications: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 17, 2023
- WID-SEC-2023-2240 IBM AIX: Mehrere Schwachstellen BSI CERT-Bund (WID) · Aug 30, 2023
- WID-SEC-2023-1843 OpenBSD: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Aug 30, 2023
- ELSA-2023-12711 Critical: openssh security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 10, 2023
- ALAS2023-2023-273 Important: openssh security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 9, 2023
- ALAS2-2023-2176 Important: openssh security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Aug 8, 2023
- ELSA-2023-4412 Important: openssh security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Aug 2, 2023
- ELSA-2023-4419 Important: openssh security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Aug 2, 2023
- ELSA-2023-4382 Important: openssh security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 2, 2023
References
- https://news.ycombinator.com/item?id=36790196
- https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent
- https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt
- https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
- https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
- https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
- https://www.openssh.com/txt/release-9.3p2
- https://www.openssh.com/security.html
- GLSA-202307-01 vendor-advisory
- [oss-security] 20230719 Re: CVE-2023-38408: Remote Code Execution in OpenSSH's forwarded ssh-agent mailing-list
- [oss-security] 20230720 Re: Announce: OpenSSH 9.3p2 released mailing-list
- http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html
- FEDORA-2023-878e04f4ae vendor-advisory
- FEDORA-2023-79a18e1725 vendor-advisory
- https://security.netapp.com/advisory/ntap-20230803-0010/
- [debian-lts-announce] 20230817 [SECURITY] [DLA 3532-1] openssh security update mailing-list
- [oss-security] 20230922 Re: illumos (or at least danmcd) membership in the distros list mailing-list
- [oss-security] 20230922 Re: illumos (or at least danmcd) membership in the distros list mailing-list
- https://support.apple.com/kb/HT213940
- https://www.vicarius.io/vsociety/posts/exploring-opensshs-agent-forwarding-rce-cve-2023-38408