# 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…

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 79.7%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 3 links below, marked "exploit"
- Published: 2023-07-20T00:00:00.000Z
- Modified: 2026-10-15T00:16:34.667Z
- Weaknesses: CWE-428
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: mitre

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- openbsd openssh: before 9.3; 9.3
- fedoraproject fedora: 37; 38

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt> (exploit, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2023/07/20/1> (exploit, mailing-list, third-party-advisory)
- <http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html> (exploit, third-party-advisory, vdb-entry)
- <https://news.ycombinator.com/item?id=36790196> (issue-tracking, patch)
- <https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent> (third-party-advisory)
- <https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca> (patch)
- <https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8> (patch)
- <https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d> (patch)
- <https://www.openssh.com/txt/release-9.3p2> (release-notes)
- <https://www.openssh.com/security.html> (vendor-advisory)
- <https://security.gentoo.org/glsa/202307-01> (third-party-advisory, vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2023/07/20/2> (mailing-list, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAXVQS6ZYTULFAK3TEJHRLKZALJS3AOU/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CEBTJJINE2I3FHAUKKNQWMFGYMLSMWKQ/> (vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20230803-0010/>
- <https://lists.debian.org/debian-lts-announce/2023/08/msg00021.html> (mailing-list)
- <http://www.openwall.com/lists/oss-security/2023/09/22/9> (mailing-list)
- <http://www.openwall.com/lists/oss-security/2023/09/22/11> (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>

## Sources

- CVE List: [CVE-2023-38408](https://www.cve.org/CVERecord?id=CVE-2023-38408), CVE Terms of Use, modified 2026-10-14
- NVD: [CVE-2023-38408](https://nvd.nist.gov/vuln/detail/CVE-2023-38408), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2023-38408 · Whole record: https://cve.day/CVE-2023-38408.json · Rebuilt by cve.day 2026-11-25T22:58:26.069Z
