CVE-2023-38408CWE-428

CVE-2023-38408

Critical · published July 20, 2023

Patch now

High probability of exploitation

CVSS calls it critical at 9.8. It sits in the 99.6th percentile for exploit probability.

CVSS v3.1
9.8
EPSS
80%
Percentile
99.6
In the wild
Unconfirmed
What it is

🔥 An insufficiently trusted search path in ssh-agent could lead to remote code execution, like a bouncer allowing anyone into a VIP lounge simply because they wore the right outfit! Imagine you’ve entrusted your valuables to a hotel with a shady reputation for letting in any guest who shows up at the door. The PKCS#11 feature in OpenSSH has become that sketchy hotel, letting attackers load potentially harmful code if your agent gets forwarded to their system. An attacker could exploit this vulnerability to run malicious code on your system, potentially allowing them to steal your data, manipulate your files, or gain full control over your environment. This is absolutely devastating for both individual users and organizations, as it could lead to severe data breaches or system compromises!

Put simply

Imagine you’ve entrusted your valuables to a hotel with a shady reputation for letting in any guest who shows up at the door. The PKCS#11 feature in OpenSSH has become that sketchy hotel, letting attackers load potentially harmful code if your agent gets forwarded to their system. This vulnerability arises from an insufficiently trustworthy search path in ssh-agent, allowing remote attackers to exploit agent forwarding on compromised systems. Specifically, it stems from an incomplete fix for a previous vulnerability (CVE-2016-10009), leaving the door ajar for potential exploitation.

What to do

An attacker could exploit this vulnerability to run malicious code on your system, potentially allowing them to steal your data, manipulate your files, or gain full control over your environment. This is absolutely devastating for both individual users and organizations, as it could lead to severe data breaches or system compromises! Upgrade OpenSSH to version 9.3p2 or later to mitigate this vulnerability. Be cautious with agent forwarding and consider disabling it if it's not necessary for your use case. Regularly audit your systems to ensure that only safe and trusted paths are used for loading code. You've got this! By taking these steps, you can lock down your systems and keep them secure. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.79700 · 99.6th percentile
Weakness
CWE-428 · Unquoted Search Path or Element
Published
2023-07-20T07:15Z
Affected products (5)
ProductVersionsFixed in
openbsd/openssh< 9.39.3
openbsd/opensshall versions—
openbsd/opensshall versions—
fedoraproject/fedoraall versions—
fedoraproject/fedoraall versions—
References (41)
http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html · [email protected]http://www.openwall.com/lists/oss-security/2023/07/20/1 · [email protected]http://www.openwall.com/lists/oss-security/2023/07/20/2 · [email protected]http://www.openwall.com/lists/oss-security/2023/09/22/11 · [email protected]http://www.openwall.com/lists/oss-security/2023/09/22/9 · [email protected]https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent · [email protected]https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8 · [email protected]https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d · [email protected]https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca · [email protected]https://lists.debian.org/debian-lts-announce/2023/08/msg00021.html · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CEBTJJINE2I3FHAUKKNQWMFGYMLSMWKQ/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAXVQS6ZYTULFAK3TEJHRLKZALJS3AOU/ · [email protected]https://news.ycombinator.com/item?id=36790196 · [email protected]https://security.gentoo.org/glsa/202307-01 · [email protected]https://security.netapp.com/advisory/ntap-20230803-0010/ · [email protected]https://support.apple.com/kb/HT213940 · [email protected]https://www.openssh.com/security.html · [email protected]https://www.openssh.com/txt/release-9.3p2 · [email protected]https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt · [email protected]https://www.vicarius.io/vsociety/posts/exploring-opensshs-agent-forwarding-rce-cve-2023-38408 · [email protected]http://packetstormsecurity.com/files/173661/OpenSSH-Forwarded-SSH-Agent-Remote-Code-Execution.html · af854a3a-2127-422b-91ae-364da2661108http://www.openwall.com/lists/oss-security/2023/07/20/1 · af854a3a-2127-422b-91ae-364da2661108http://www.openwall.com/lists/oss-security/2023/07/20/2 · af854a3a-2127-422b-91ae-364da2661108http://www.openwall.com/lists/oss-security/2023/09/22/11 · af854a3a-2127-422b-91ae-364da2661108http://www.openwall.com/lists/oss-security/2023/09/22/9 · af854a3a-2127-422b-91ae-364da2661108https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent · af854a3a-2127-422b-91ae-364da2661108https://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8 · af854a3a-2127-422b-91ae-364da2661108https://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d · af854a3a-2127-422b-91ae-364da2661108https://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2023/08/msg00021.html · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CEBTJJINE2I3FHAUKKNQWMFGYMLSMWKQ/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAXVQS6ZYTULFAK3TEJHRLKZALJS3AOU/ · af854a3a-2127-422b-91ae-364da2661108https://news.ycombinator.com/item?id=36790196 · af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/202307-01 · af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20230803-0010/ · af854a3a-2127-422b-91ae-364da2661108https://support.apple.com/kb/HT213940 · af854a3a-2127-422b-91ae-364da2661108https://www.openssh.com/security.html · af854a3a-2127-422b-91ae-364da2661108https://www.openssh.com/txt/release-9.3p2 · af854a3a-2127-422b-91ae-364da2661108https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt · af854a3a-2127-422b-91ae-364da2661108https://www.vicarius.io/vsociety/posts/exploring-opensshs-agent-forwarding-rce-cve-2023-38408 · af854a3a-2127-422b-91ae-364da2661108https://cert-portal.siemens.com/productcert/html/ssa-398330.html · 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
EPSS history
Timeline
  • 20 JUL 00:00Z
    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…
    cvelistv5