CVE-2023-38408
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.
02 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.
03 Exploitation and scoring
- Exploitation
- Assessed, none found. CISA's assessment recorded neither public exploit code nor evidence of exploitation when it was made.
- SSVC decision
- ExploitationnoneCISA recorded no public exploit code and no evidence of exploitation.
- AutomatableyesAn attacker can reliably automate reconnaissance through exploitation, so this scales.
- Technical ImpacttotalSuccessful exploitation gives total control of the vulnerable component.
- EPSS probability
- 79.70% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 99.5% of scored records. A rank, not a probability.
- NVD base score
- 9.8 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-10-15.
- Red Hat severity
- Important. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2023-07-20 00:00Z3 YR AGO
- Last updated
- 2026-10-14 23:35Z14 DAYS AGO
- Reserved
- 2023-07-17
- Assigning CNA
- mitre
- Record state
- PUBLISHED
- Severity
- Critical (CVSS 9.8)
- CNA CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-428Unquoted Search Path or ElementBase
- Data version
- 5.2
- Document digest
- 26884fc28bd052cab93c208d03c1dc948b02eed24e780bd4ad1a0c44f5891b2e
05 Affected products
06 References
- news.ycombinator.comhttps://news.ycombinator.com/item?id=36790196
- blog.qualys.comhttps://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent
- www.qualys.comhttps://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt
- github.comhttps://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
- github.comhttps://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
- github.comhttps://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
- www.openssh.comhttps://www.openssh.com/txt/release-9.3p2
- www.openssh.comhttps://www.openssh.com/security.html
- security.gentoo.orgGLSA-202307-01https://security.gentoo.org/glsa/202307-01
- www.openwall.com[oss-security] 20230719 Re: CVE-2023-38408: Remote Code Execution in OpenSSH's forwarded ssh-agenthttp://www.openwall.com/lists/oss-security/2023/07/20/1
- www.openwall.com[oss-security] 20230720 Re: Announce: OpenSSH 9.3p2 releasedhttp://www.openwall.com/lists/oss-security/2023/07/20/2
- packetstormsecurity.comhttp://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html
- lists.fedoraproject.orgFEDORA-2023-878e04f4aehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAXVQS6ZYTULFAK3TEJHRLKZALJS3AOU/
- lists.fedoraproject.orgFEDORA-2023-79a18e1725https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CEBTJJINE2I3FHAUKKNQWMFGYMLSMWKQ/
- security.netapp.comhttps://security.netapp.com/advisory/ntap-20230803-0010/
- lists.debian.org[debian-lts-announce] 20230817 [SECURITY] [DLA 3532-1] openssh security updatehttps://lists.debian.org/debian-lts-announce/2023/08/msg00021.html
- www.openwall.com[oss-security] 20230922 Re: illumos (or at least danmcd) membership in the distros listhttp://www.openwall.com/lists/oss-security/2023/09/22/9
- www.openwall.com[oss-security] 20230922 Re: illumos (or at least danmcd) membership in the distros listhttp://www.openwall.com/lists/oss-security/2023/09/22/11
- support.apple.comhttps://support.apple.com/kb/HT213940
- www.vicarius.iohttps://www.vicarius.io/vsociety/posts/exploring-opensshs-agent-forwarding-rce-cve-2023-38408
- cert-portal.siemens.comhttps://cert-portal.siemens.com/productcert/html/ssa-398330.html
07 Fixed in
AlmaLinux 8
- openssh Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-askpass Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-cavs Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-clients Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-keycat Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-ldap Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-server Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- pam_ssh_agent_auth Fixed
A version is affected if any line below covers it.
- Affected before 0.10.3-7.19.el8_8
- Affected before 0.10.3-8.33.el8_10
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
AlmaLinux 9
- openssh Fixed in 8.7p1-30.el9_2
- openssh-askpass Fixed in 8.7p1-30.el9_2
- openssh-clients Fixed in 8.7p1-30.el9_2
- openssh-keycat Fixed in 8.7p1-30.el9_2
- openssh-server Fixed in 8.7p1-30.el9_2
- pam_ssh_agent_auth Fixed in 0.10.4-5.30.el9_2
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
CloudLinux 8
- openssh Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-askpass Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-cavs Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-clients Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-keycat Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-ldap Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- openssh-server Fixed
A version is affected if any line below covers it.
- Affected before 8.0p1-19.el8_8
- Affected before 8.0p1-33.el8_10
- pam_ssh_agent_auth Fixed
A version is affected if any line below covers it.
- Affected before 0.10.3-7.19.el8_8
- Affected before 0.10.3-8.33.el8_10
Derived from AlmaLinux 8. Partial coverage: only packages taken from AlmaLinux 8 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
CloudLinux 9
- openssh Fixed in 8.7p1-30.el9_2
- openssh-askpass Fixed in 8.7p1-30.el9_2
- openssh-clients Fixed in 8.7p1-30.el9_2
- openssh-keycat Fixed in 8.7p1-30.el9_2
- openssh-server Fixed in 8.7p1-30.el9_2
- pam_ssh_agent_auth Fixed in 0.10.4-5.30.el9_2
Derived from AlmaLinux 9. Partial coverage: only packages taken from AlmaLinux 9 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Debian 12
- openssh Fixed in 1:9.2p1-2+deb12u1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 13
- openssh Fixed in 1:9.3p2-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 14
- openssh Fixed in 1:9.3p2-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 18.04 LTS
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- openssh Fixed in 1:8.2p1-4ubuntu0.8
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 22.04 LTS
- openssh Fixed in 1:8.9p1-3ubuntu0.3
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 24.04 LTS
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 25.10
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 26.04 LTS
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 26.10
- openssh-ssh1 No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 14.04 LTS
- openssh Fixed in 1:6.6p1-2ubuntu2.13+esm1Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 16.04 LTS
- openssh Fixed in 1:7.2p2-4ubuntu2.10+esm3Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 18.04 LTS
- openssh Fixed in 1:7.6p1-4ubuntu0.7+esm1Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS-updates 16.04 LTS
- openssh Fixed in 1:7.2p2-4ubuntu2.fips.2.10.4Available with Ubuntu Pro: https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS-updates 18.04 LTS
- openssh Fixed in 1:7.9p1-10~ubuntu18.04.fips.0.8Available with Ubuntu Pro: https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS-updates 20.04 LTS
- openssh Fixed in 1:8.2p1-4ubuntu0.fips.0.8Available with Ubuntu Pro: https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS 16.04 LTS
- openssh No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS 18.04 LTS
- openssh No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro FIPS 20.04 LTS
- openssh No fix yet
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.