CVE-2023-6004Libssh: proxycommand/proxyjump features allow injection of malicious code through hostname
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | libssh | Fixed | 0.9.6-2ubuntu0.22.04.3 | UBUNTU-CVE-2023-6004 |
| Ubuntu 20.04 | libssh | Fixed | 0.9.3-2ubuntu2.5 | UBUNTU-CVE-2023-6004 |
| Ubuntu 18.04 | libssh | Fix pending | 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm3 (Ubuntu Pro) | UBUNTU-CVE-2023-6004 |
| Ubuntu 16.04 | libssh | Fix pending | 0.6.3-4.3ubuntu0.6+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-6004 |
| Ubuntu 14.04 | libssh | Fix pending | ||
| Debian 14 | libssh | Fixed | 0.10.6-1 | DEBIAN-CVE-2023-6004 |
| Debian 13 | libssh | Fixed | 0.10.6-1 | DEBIAN-CVE-2023-6004 |
| Debian 12 | libssh | Fixed | 0.10.6-0+deb12u1 | DEBIAN-CVE-2023-6004 |
| Red Hat Enterprise Linux 9 | libssh | Fixed | 0:0.10.4-13.el9 | RHSA-2024:2504 |
| Red Hat Enterprise Linux 9 | libssh-config | Fixed | 0:0.10.4-13.el9 | RHSA-2024:2504 |
| Red Hat Enterprise Linux 9 | libssh-devel | Fixed | 0:0.10.4-13.el9 | RHSA-2024:2504 |
| Red Hat Enterprise Linux 8 | libssh | Fixed | 0:0.9.6-14.el8 | RHSA-2024:3233 |
| Red Hat Enterprise Linux 8 | libssh-config | Fixed | 0:0.9.6-14.el8 | RHSA-2024:3233 |
| Red Hat Enterprise Linux 8 | libssh-devel | Fixed | 0:0.9.6-14.el8 | RHSA-2024:3233 |
| Red Hat Enterprise Linux 7 | libssh | Will not fix Out of support scope | ||
| AlmaLinux 9 | libssh | Fixed | 0.10.4-13.el9 | ALSA-2024:2504 |
| AlmaLinux 9 | libssh-config | Fixed | 0.10.4-13.el9 | ALSA-2024:2504 |
| AlmaLinux 9 | libssh-devel | Fixed | 0.10.4-13.el9 | ALSA-2024:2504 |
| AlmaLinux 8 | libssh | Fixed | 0.9.6-14.el8 | ALSA-2024:3233 |
| AlmaLinux 8 | libssh-config | Fixed | 0.9.6-14.el8 | ALSA-2024:3233 |
| AlmaLinux 8 | libssh-devel | Fixed | 0.9.6-14.el8 | ALSA-2024:3233 |
| Rocky Linux 9 | libssh | Fixed | 0:0.10.4-13.el9 | RLSA-2024:2504 |
| Rocky Linux 8 | libssh | Fixed | 0:0.9.6-14.el8 | RLSA-2024:3233 |
| Alpine Linux 3.24 | libssh | Fixed | 0.10.6-r0 | ALPINE-CVE-2023-6004 |
| Alpine Linux 3.23 | libssh | Fixed | 0.10.6-r0 | ALPINE-CVE-2023-6004 |
| Alpine Linux 3.22 | libssh | Fixed | 0.10.6-r0 | ALPINE-CVE-2023-6004 |
| Alpine Linux 3.21 | libssh | Fixed | 0.10.6-r0 | ALPINE-CVE-2023-6004 |
| Alpine Linux 3.20 | libssh | Fixed | 0.10.6-r0 | ALPINE-CVE-2023-6004 |
| Alpine Linux 3.19 | libssh | Fixed | 0.10.6-r0 | ALPINE-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.
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 7
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:
- https://access.redhat.com/errata/RHSA-2024:2504 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:3233 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2024:2504
- https://access.redhat.com/errata/RHSA-2024:3233
- https://access.redhat.com/security/cve/CVE-2023-6004
- https://bugzilla.redhat.com/show_bug.cgi?id=2251110
- https://www.libssh.org/security/advisories/CVE-2023-6004.txt
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.