CVE-2023-38408
JSON

9.8critical

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
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
79.7% (higher than 99% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
openbsd opensshbefore 9.3, 9.3NVD
fedoraproject fedora37, 38NVD

All scores

CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-428

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

La característica PKCS#11 en ssh-agent en OpenSSH anterior a 9.3p2 tiene una ruta de búsqueda insuficientemente confiable, lo que lleva a la ejecución remota de código si un agente se reenvía a un sistema controlado por un atacante. (El código en /usr/lib no es necesariamente seguro para cargar en ssh-agent). NOTA: este problema existe debido a una solución incompleta para CVE-2016-10009.

References

https://news.ycombinator.com/item?id=36790196issue-tracking, patch
https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agentthird-party-advisory
https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txtexploit, third-party-advisory
https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7capatch
https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8patch
https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351dpatch
https://www.openssh.com/txt/release-9.3p2release-notes
https://www.openssh.com/security.htmlvendor-advisory
https://security.gentoo.org/glsa/202307-01third-party-advisory, vendor-advisory
http://www.openwall.com/lists/oss-security/2023/07/20/1exploit, mailing-list, third-party-advisory
http://www.openwall.com/lists/oss-security/2023/07/20/2mailing-list, third-party-advisory
http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.htmlexploit, third-party-advisory, vdb-entry

Sources

SourceRecordLicence
CVE ListCVE-2023-38408 changed 2026-10-14CVE Terms of Use
NVDCVE-2023-38408 changed 2026-10-15Public domain