HexBrain

Internet Bug Bounty · Report #2293731

Command Injection using malicious hostname in expanded proxycommand

Validstatus
lowseverity
$540bounty
39upvotes
28 Feb 2024disclosed

Summary

Subject: Security weakness in ProxyCommand handling CVE ID#: CVE-2023-6004 Versions: 0.10.x, 0.9.x, 0.8.x Summary: ProxyCommand/ProxyJump features enable to inject malicious code through hostname

Description Using the ProxyCommand or the ProxyJump feature enables users to exploit unchecked hostname syntax on the client, which enables to inject malicious code into the command of the above-mentioned features through the hostname parameter.

User interaction is required to exploit this issue.

Credits Originally reported by Vinci (https:// github.com/vin01). Patches provided by Norbert Pocs of the libssh team.

Full Security Advisory: https://www.libssh.org/security/advisories/CVE-2023-6004.txt

How it was found

Using the ProxyCommand or the ProxyJump feature enables users to exploit unchecked hostname syntax on the client, which enables to inject malicious code into the command of the above-mentioned features through the hostname parameter.

User interaction is required to exploit this issue.

Advisory from libssh: https://www.libssh.org/security/advisories/CVE-2023-6004.txt

Advisory from OpenSSH which also suffered from this flaw: https://www.openssh.com/txt/release-9.6

Impact

Code execution via malicious input hostname or other tokens

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original