---
id: CVE-2023-6004
title: >-
  Libssh: proxycommand/proxyjump features allow injection of malicious code
  through hostname
summary: >-
  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 mention…
severity: medium
cvss: 4.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L'
cvssSource: cna
cwe:
  - CWE-74
vendor: Red Hat
product: libssh
affected:
  - libssh (all versions)
  - libssh (all versions)
  - libssh (all versions)
  - libssh (all versions)
  - libssh
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2024-01-10T20:45:01.633139Z'
published: '2024-01-03'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T13:40:03.637Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2023-6004'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2024:2504'
    label: 'RHSA-2024:2504'
  - url: 'https://access.redhat.com/errata/RHSA-2024:3233'
    label: 'RHSA-2024:3233'
  - url: 'https://access.redhat.com/security/cve/CVE-2023-6004'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2251110'
    label: RHBZ#2251110
  - url: 'https://www.libssh.org/security/advisories/CVE-2023-6004.txt'
tags:
  - cve.org
epss: 0.00449
epssPercentile: 0.39261
ingestedAt: '2026-11-06T13:52:17.105Z'
---

## Overview

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.

## Affected

- `libssh (all versions)`
- `libssh (all versions)`
- `libssh (all versions)`
- `libssh (all versions)`
- `libssh`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

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.
