CVE-2026-116696 in russhinfo

Summary

by MITRE • 10/27/2026

russh is a Rust SSH client and server library that includes an SSH agent protocol implementation. Prior to 0.65.0, russh::keys::agent::server::serve in russh/src/keys/agent/server.rs accepts repeated SSH_AGENT_CONSTRAIN_CONFIRM records while adding a key and appends every Constraint::Confirm record to the key's retained constraint vector without a count or memory limit. A process that can connect to the agent socket, including the remote side of a forwarded agent session, can repeatedly add constrained keys and cause renewable memory growth that persists for the process lifetime because keys without a lifetime constraint do not expire. This issue is fixed in version 0.65.0.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 10/27/2026

The vulnerability identified within the russh library, specifically affecting versions prior to 0.65.0, represents a significant resource exhaustion risk stemming from improper input validation and memory management practices in its SSH agent protocol implementation. The core technical flaw resides in the serve function located at russh/src/keys/agent/server.rs, which handles requests related to managing cryptographic keys within an SSH agent context. When processing key addition operations that include constraints, such as limiting a key's usage or lifetime, the server accepts repeated SSH_AGENT_CONSTRAIN_CONFIRM records without enforcing any upper bound on the quantity of these records. Consequently, every Constraint::Confirm record is appended directly to the retained constraint vector associated with the specific key entry in memory. This lack of a count limit allows an attacker to inject an arbitrary number of constraints for a single key identifier, leading to unbounded growth of the data structure holding these constraints.

From an operational perspective, this flaw facilitates a remote resource exhaustion attack that can be executed by any process possessing access to the SSH agent socket. In typical usage scenarios, particularly those involving SSH agent forwarding over network connections, the agent socket is accessible not only locally but also through the forwarded channel from a remote host. An adversary controlling the remote side of such a session can exploit this behavior by repeatedly sending key addition requests containing multiple constraint confirmations. Because keys that are added without an explicit lifetime constraint do not automatically expire or get garbage collected during the process lifecycle, the memory allocated for these excessive constraints persists until the SSH agent process is terminated. This results in sustained and potentially significant renewable memory growth, which can degrade system performance, cause denial of service by exhausting available RAM, or trigger out-of-memory conditions that crash the host application relying on the russh library.

This vulnerability aligns with CWE-400, Uncontrolled Resource Consumption, as it allows an attacker to consume excessive resources due to a lack of limits on input processing. Furthermore, in the context of the MITRE ATT&CK framework, this behavior is indicative of T1496, Resource Hijacking, where attackers leverage compromised or accessible services to consume system resources for disruptive purposes rather than direct data exfiltration. The attack vector leverages the trust model inherent in SSH agent forwarding, assuming that connections through forwarded sockets are safe from malicious constraint injection, which proves incorrect when input validation is absent.

To mitigate this vulnerability, organizations and developers must ensure they upgrade russh to version 0.65.0 or later, where the issue has been resolved by implementing appropriate limits on the number of constraints per key. For systems that cannot immediately update due to dependency conflicts, temporary mitigations involve restricting access to SSH agent sockets through strict file system permissions so that only trusted local processes can connect. Additionally, monitoring memory usage patterns in applications utilizing russh for anomalies indicative of rapid allocation growth may provide early detection signals before a full denial-of-service condition occurs. Regular auditing of third-party library versions and adherence to secure coding practices that enforce input validation limits are essential steps in preventing similar resource exhaustion flaws in network-facing services.

Responsible

GitHub M

Reservation

10/26/2026

Disclosure

10/27/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!