Remote code execution in OpenSSH ssh-agent



Published: 2023-07-20 | Updated: 2024-04-05
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2023-38408
CWE-ID CWE-426
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
OpenSSH
Server applications / Remote management servers, RDP, SSH

Vendor OpenSSH

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Untrusted search path

EUVDB-ID: #VU78454

Risk: Medium

CVSSv3.1: 6.7 [CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: CVE-2023-38408

CWE-ID: CWE-426 - Untrusted Search Path

Exploit availability: Yes

Description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to usage of an insecure search path within the PKCS#11 feature in ssh-agent. A remote attacker can trick the victim into connecting to a malicious SSH server and execute arbitrary code on the system, if an agent is forwarded to an attacker-controlled system.

Note, this vulnerability exists due to incomplete fix for #VU2015 (CVE-2016-10009).

Mitigation

Install updates from vendor's website.

Vulnerable software versions

OpenSSH: 7.0 - 9.3p1

External links

http://github.com/openbsd/src/commit/7bc29a9d5cd697290aa056e94ecee6253d3425f8
http://www.openssh.com/txt/release-9.3p2
http://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt
http://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent
http://news.ycombinator.com/item?id=36790196
http://github.com/openbsd/src/commit/f8f5a6b003981bb824329dc987d101977beda7ca
http://github.com/openbsd/src/commit/f03a4faa55c4ce0818324701dadbf91988d7351d
http://www.openssh.com/security.html
http://security.gentoo.org/glsa/202307-01


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

How the attacker can exploit this vulnerability?

The attacker would have to send a specially crafted request to the affected application in order to exploit this vulnerability.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.



###SIDEBAR###