CVE-2026-59846
Received Received - Intake

libssh ProxyCommand Username Injection Vulnerability

Vulnerability report for CVE-2026-59846, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-21

Last updated on: 2026-07-21

Assigner: Red Hat, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-21
Last Modified
2026-07-21
Generated
2026-07-21
AI Q&A
2026-07-21
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
libssh libssh *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in libssh involves improper handling of username expansion in ProxyCommand. When a username contains %r and is expanded, malicious shell metacharacters can be injected. This bypasses validation in ssh_check_username_syntax() and allows attackers to manipulate shell behavior, potentially exposing environment variables or causing unintended actions.

Detection Guidance

Check libssh versions for affected releases and inspect logs for ProxyCommand handling with username expansion containing %r. Look for unusual shell metacharacters in username fields during SSH connections.

Impact Analysis

If you use libssh with ProxyCommand and untrusted username input, an attacker could craft a username to execute shell commands or leak sensitive environment variables. This requires the attacker to control part of the username and the system to use ProxyCommand with shell evaluation.

Compliance Impact

This vulnerability could lead to information disclosure, which may violate GDPR (data protection) or HIPAA (privacy) if sensitive data like environment variables are exposed. Compliance depends on whether the affected system processes regulated data and the impact of the disclosure.

Mitigation Strategies

Update libssh to the latest patched version. Disable ProxyCommand usage if not required. Validate all username inputs to prevent shell metacharacter injection before expansion.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59846. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart