CVEfocus › CVE database › CVE-2023-6004

CVE-2023-6004Libssh: proxycommand/proxyjump features allow injection of malicious code through hostname

CVSS 4.8 MediumEPSS 0.4% (higher than 40% of CVEs)Published 2024-01-03Updated 2026-11-06Assigner: redhat

A flaw was found in libssh. By utilizing the ProxyCommand or ProxyJump feature, users can exploit unchecked hostname syntax on the client. This issue may allow an attacker to inject malicious code into the command of the features mentioned through the hostname parameter.

CWE-74

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

25Fixed
3Fix pending
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04libsshFixed0.9.6-2ubuntu0.22.04.3UBUNTU-CVE-2023-6004
Ubuntu 20.04libsshFixed0.9.3-2ubuntu2.5UBUNTU-CVE-2023-6004
Ubuntu 18.04libsshFix pending0.8.0~20170825.94fa1e38-1ubuntu0.7+esm3 (Ubuntu Pro)UBUNTU-CVE-2023-6004
Ubuntu 16.04libsshFix pending0.6.3-4.3ubuntu0.6+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-6004
Ubuntu 14.04libsshFix pending
Debian 14libsshFixed0.10.6-1DEBIAN-CVE-2023-6004
Debian 13libsshFixed0.10.6-1DEBIAN-CVE-2023-6004
Debian 12libsshFixed0.10.6-0+deb12u1DEBIAN-CVE-2023-6004
Red Hat Enterprise Linux 9libsshFixed0:0.10.4-13.el9RHSA-2024:2504
Red Hat Enterprise Linux 9libssh-configFixed0:0.10.4-13.el9RHSA-2024:2504
Red Hat Enterprise Linux 9libssh-develFixed0:0.10.4-13.el9RHSA-2024:2504
Red Hat Enterprise Linux 8libsshFixed0:0.9.6-14.el8RHSA-2024:3233
Red Hat Enterprise Linux 8libssh-configFixed0:0.9.6-14.el8RHSA-2024:3233
Red Hat Enterprise Linux 8libssh-develFixed0:0.9.6-14.el8RHSA-2024:3233
Red Hat Enterprise Linux 7libsshWill not fix
Out of support scope
AlmaLinux 9libsshFixed0.10.4-13.el9ALSA-2024:2504
AlmaLinux 9libssh-configFixed0.10.4-13.el9ALSA-2024:2504
AlmaLinux 9libssh-develFixed0.10.4-13.el9ALSA-2024:2504
AlmaLinux 8libsshFixed0.9.6-14.el8ALSA-2024:3233
AlmaLinux 8libssh-configFixed0.9.6-14.el8ALSA-2024:3233
AlmaLinux 8libssh-develFixed0.9.6-14.el8ALSA-2024:3233
Rocky Linux 9libsshFixed0:0.10.4-13.el9RLSA-2024:2504
Rocky Linux 8libsshFixed0:0.9.6-14.el8RLSA-2024:3233
Alpine Linux 3.24libsshFixed0.10.6-r0ALPINE-CVE-2023-6004
Alpine Linux 3.23libsshFixed0.10.6-r0ALPINE-CVE-2023-6004
Alpine Linux 3.22libsshFixed0.10.6-r0ALPINE-CVE-2023-6004
Alpine Linux 3.21libsshFixed0.10.6-r0ALPINE-CVE-2023-6004
Alpine Linux 3.20libsshFixed0.10.6-r0ALPINE-CVE-2023-6004
Alpine Linux 3.19libsshFixed0.10.6-r0ALPINE-CVE-2023-6004

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.