Skip to main content

libssh CVE-2026-59846

| EUVDEUVD-2026-46254 LOW
Command Injection (CWE-77)
2026-07-21 secalert@redhat.com GHSA-fvwj-j79q-57v7
3.9
CVSS 3.1 · Vendor: redhat

Severity by source

Vendor (redhat) PRIMARY
3.9 LOW
AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
vuln.today AI
3.9 LOW

Local attack requiring low-privilege username control and user-initiated SSH connection; impact limited to environment variable disclosure and minor shell behavior alteration with no availability impact.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
4.0 AV:L/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Analysis Generated
Jul 21, 2026 - 13:31 vuln.today

DescriptionCVE.org

A flaw was found in libssh. A malicious username expanded through %r in ProxyCommand handling can inject shell metacharacters, exposing environment variables and causing unintended shell behavior.

AnalysisAI

Shell metacharacter injection in libssh's ProxyCommand handling allows a crafted SSH username to break out of the intended command string when the %r token is expanded. Affecting libssh deployments that use ProxyCommand with %r substitution, a low-privileged local attacker who controls the username passed to the connection can cause the shell executing the ProxyCommand to expand environment variables or alter its behavior, leaking sensitive environment data. No public exploit is identified and this is not listed in CISA KEV; CVSS rates this Low (3.9), consistent with the constrained local attack surface and limited impact.

Technical ContextAI

libssh is a C library implementing the SSH protocol used by numerous Linux applications and embedded systems. ProxyCommand is an SSH configuration directive that routes connections through an intermediary shell command; the %r token within ProxyCommand strings is replaced with the remote (target) username at connection time. When libssh performs this expansion without sanitizing shell metacharacters in the username, characters such as $, $(), backticks, semicolons, or pipes are passed verbatim into the shell command string, causing the /bin/sh interpreter executing the ProxyCommand to perform unintended variable expansion or command substitution. CWE is not formally assigned in the available data, but the root cause aligns with CWE-78 (OS Command Injection via improper neutralization of special elements) or CWE-116 (Improper Encoding or Escaping of Output). The issue was reported by Red Hat's security team (secalert@redhat.com), suggesting it affects Red Hat-distributed builds of libssh.

RemediationAI

Apply the vendor-released patch for libssh as distributed through the Red Hat advisory at https://access.redhat.com/security/cve/CVE-2026-59846; the exact fixed version is not independently confirmed from the available data, and the Bugzilla entry at https://bugzilla.redhat.com/show_bug.cgi?id=2498179 should be monitored for fix version confirmation. As an immediate compensating control, audit all SSH client configurations that use ProxyCommand with %r expansion and replace %r with a hardcoded, trusted username where possible - this eliminates the injection vector but breaks dynamic username proxying workflows that legitimate multi-user jump-host setups may rely on. Alternatively, restrict which users can supply SSH usernames to ProxyCommand-using configurations, or wrap ProxyCommand execution in a script that sanitizes input before shell expansion. Avoid deploying libssh-based tooling in contexts where untrusted input directly influences the SSH username without sanitization.

CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2021-40438 CRITICAL POC
9.0 Sep 16

A crafted request uri-path can cause mod_proxy to forward the request to an origin server choosen by the remote user.4.4

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2016-5195 HIGH POC
7.0 Nov 10

Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by lev

CVE-2023-4911 HIGH POC
7.8 Oct 03

Local privilege escalation in the GNU C Library (glibc) dynamic loader ld.so allows unprivileged local users on affected

CVE-2017-1000253 HIGH POC
7.8 Oct 05

Linux distributions that have not patched their long-term kernels with https://git.kernel.org/linus/a87938b2e246b81b4fb7

CVE-2017-5645 CRITICAL POC
9.8 Apr 17

In Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events

CVE-2015-0240 CRITICAL POC
10.0 Feb 24

The Netlogon server implementation in smbd in Samba 3.5.x and 3.6.x before 3.6.25, 4.0.x before 4.0.25, 4.1.x before 4.1

CVE-2016-6662 CRITICAL POC
9.8 Sep 20

Oracle MySQL through 5.5.52, 5.6.x through 5.6.33, and 5.7.x through 5.7.15; MariaDB before 5.5.51, 10.0.x before 10.0.2

CVE-2025-32463 CRITICAL POC
9.3 Jun 30

Sudo before 1.9.17p1 contains a local root escalation vulnerability (CVE-2025-32463, CVSS 9.3) through the --chroot opti

Share

CVE-2026-59846 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy