CVE-2023-38408
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.
Description as published by the source, in English.
Key facts
- Published
- 2023-07-20
- Last modified
- 2026-10-15
- Assigned by
- cve@mitre.org
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Scored by
- nvd@nist.gov (NVD Primary)
- Probability of exploitation
-
79.7 %
among the highest of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Yes, see references
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Fedoraproject | Fedora | 37 | Affected |
| Fedoraproject | Fedora | 38 | Affected |
| Openbsd | Openssh | < 9.3 | Affected |
| Openbsd | Openssh | 9.3 | Affected |
Weakness type
-
CWE-428: Unquoted Search Path or Element
The product uses a search path that contains an unquoted element, in which the element contains whitespace or other separators. This can cause the product to access resources in a parent path.
References
- http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execu…
- http://www.openwall.com/lists/oss-security/2023/07/20/1
- http://www.openwall.com/lists/oss-security/2023/07/20/2
- https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-…
- https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
- https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
- https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
- https://news.ycombinator.com/item?id=36790196
- https://security.gentoo.org/glsa/202307-01
- https://www.openssh.com/security.html
- https://www.openssh.com/txt/release-9.3p2
- https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt
- http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execu…
- http://www.openwall.com/lists/oss-security/2023/07/20/1
- http://www.openwall.com/lists/oss-security/2023/07/20/2
- https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-…
- https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
- https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
- https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
- https://news.ycombinator.com/item?id=36790196
Related at Berigo
Articles
-
Twelve-year-old PackageKit flaw affects widely used Linux distributions
Same product
2026-04-22
Deutsche Telekom's red team has found a CVSS 8.8 privilege escalation flaw in the PackageKit daemon, fixed in version 1.3.5.
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.