# 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. (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.

- Page: https://www.vulneraibility.com/cve/CVE-2023-38408
- CVSS: 9.8
- Known exploited: not in CISA KEV as of our last sync
- EPSS: 79.70% (percentile 99.6)
- Unvetted proof-of-concept code on GitHub: 10 GitHub proofs of concept (first 2023-08-09)
- CISA SSVC: exploitation none, automatable yes, technical impact total (assessed 2024-10-15)
- Weakness: CWE-428
- Published: 2023-07-20

## Affected

- openbsd:openssh
- fedoraproject:fedora

## References

- [other] https://news.ycombinator.com/item?id=36790196
- [other] https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent
- [other] https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt
- [other] https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
- [other] https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
- [other] https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
- [other] https://www.openssh.com/txt/release-9.3p2
- [other] https://www.openssh.com/security.html
- [advisory] https://security.gentoo.org/glsa/202307-01
- [other] http://www.openwall.com/lists/oss-security/2023/07/20/1
- [other] http://www.openwall.com/lists/oss-security/2023/07/20/2
- [other] http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html
- [advisory] https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAXVQS6ZYTULFAK3TEJHRLKZALJS3AOU/
- [advisory] https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CEBTJJINE2I3FHAUKKNQWMFGYMLSMWKQ/
- [other] https://security.netapp.com/advisory/ntap-20230803-0010/
- [other] https://lists.debian.org/debian-lts-announce/2023/08/msg00021.html
- [other] http://www.openwall.com/lists/oss-security/2023/09/22/9
- [other] http://www.openwall.com/lists/oss-security/2023/09/22/11
- [other] https://support.apple.com/kb/HT213940
- [other] https://www.vicarius.io/vsociety/posts/exploring-opensshs-agent-forwarding-rce-cve-2023-38408
- [other] https://cert-portal.siemens.com/productcert/html/ssa-398330.html

---
Summary, impact and action are written by the vulneraibility.com AI analysis pipeline from the CVE record, NVD, CISA and FIRST data; verify against the references.
