Vulnerability · Published Jul 20, 2023 · Assigned by mitre
CVE-2023-38408
Critical 9.8
In plain English
A critical-severity security flaw in the openssh package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 79.7% (higher than 99.6% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | openssh | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:8 | openssh | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:9 | openssh | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux:8 | openssh-askpass | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-askpass | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:9 | openssh-askpass | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux:8 | openssh-cavs | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-cavs | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:8 | openssh-clients | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-clients | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:9 | openssh-clients | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux:8 | openssh-keycat | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-keycat | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:9 | openssh-keycat | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux:8 | openssh-ldap | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-ldap | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:8 | openssh-server | 8.0p1-33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | openssh-server | 8.0p1-19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:9 | openssh-server | 8.7p1-30.el9_2 | ALSA-2023:4412 |
| AlmaLinux:8 | pam_ssh_agent_auth | 0.10.3-8.33.el8_10 | ALSA-2026:69266 |
| AlmaLinux:8 | pam_ssh_agent_auth | 0.10.3-7.19.el8_8 | ALSA-2023:4419 |
| AlmaLinux:9 | pam_ssh_agent_auth | 0.10.4-5.30.el9_2 | ALSA-2023:4412 |
| Debian:12 | openssh | 1:9.2p1-2+deb12u1 | DEBIAN-CVE-2023-38408 |
| Debian:13 | openssh | 1:9.3p2-1 | DEBIAN-CVE-2023-38408 |
| Debian:14 | openssh | 1:9.3p2-1 | DEBIAN-CVE-2023-38408 |
| Rocky Linux:8 | openssh | 0:8.0p1-19.el8_8 | RLSA-2023:4419 |
| Ubuntu:22.04:LTS | openssh | 1:8.9p1-3ubuntu0.3 | UBUNTU-CVE-2023-38408 |
| Ubuntu:22.04:LTS | openssh | 1:8.9p1-3ubuntu0.3 | USN-6242-1 |
| Ubuntu:22.04:LTS | openssh-ssh1 | no fix listed | UBUNTU-CVE-2023-38408 |
| Ubuntu:24.04:LTS | openssh-ssh1 | no fix listed | UBUNTU-CVE-2023-38408 |
| Ubuntu:25.10 | openssh-ssh1 | no fix listed | UBUNTU-CVE-2023-38408 |
| Ubuntu:26.04:LTS | openssh-ssh1 | no fix listed | UBUNTU-CVE-2023-38408 |
| Ubuntu:26.10 | openssh-ssh1 | no fix listed | UBUNTU-CVE-2023-38408 |
Affected products (as reported)
Weakness: CWE-428 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html