CVE-2026-111061
### Summary `russh_keys::agent::server::add_key` (`russh/src/keys/agent/server.rs:271-319`) spawns a dedicated tokio task for every 5-byte `SSH_AGENT_CONSTRAIN_LIFETIME` record attached to an added key, each cloning the key blob and sleeping for the declared lifetime (up to ~136 years). The loop has no per-request task budget, and spawned tasks are not rolled back when the overall request fails. Repeating one constrained add-key message over an agent connection converts wire bytes into resident tasks and heap at roughly 141x amplification: in our measurement 10.2 MiB of protocol traffic produced ~2,096,120 live tasks and +1,447,856 KiB RSS, while the same traffic sent as unconstrained add-key requests cost +268 KiB. An attacker reaching the agent socket (a local process, or a remote SSH server the user connects to with agent forwarding, since russh clients accept the `[email protected]` channel by default at `russh/src/client/mod.rs:2686`) can exhaust the agent process's memory and task capacity with a renewable, cheap request stream. Verified on russh HEAD efa9a03 (v0.63.3-10, 2026-10-01). ### Details ```rust // russh/src/keys/agent/server.rs:271-319 (add_key, constraint loop) while let Ok(t) = u8::decode(r) { match t { SSH_AGENT_CONSTRAIN_LIFETIME => { let lifetime = u32::decode(r)?; ... tokio::spawn({ let key = key.clone; async move { tokio::time::sleep(...lifetime...).await; /* remove key */ } }); } ... ``` Each lifetime record clones the key blob into a new task regardless of how many records the same request already spawned, and a failure later in the request leaves earlier tasks alive. Data flow: agent connection -> SSH_AGENTC_ADD_IDENTITY_CONSTRAINED -> constraint decode loop -> unbounded `tokio::spawn` per 5 bytes. The control measurement (identical wire volume as unconstrained adds) isolates the constraint path as the amplifier. ### Proof of concept Prerequisites: Linux host with cargo and git. The archive's deploy script provisions r
Properties
- Severity
- medium
- Summary
- russh: Unbounded memory allocation in agent protocol server via crafted constraint records
- Nvd fetched at
- 2026-10-20T21:14:08.448323+00:00
- Epss score
- 0.00346
- Cvss severity
- MEDIUM
- Cvss score
- 4.3
- Retrieved at
- 2026-10-21T01:24:48+00:00
- Ghsa published
- 2026-10-19T17:06:46Z
- Source url
- https://github.com/advisories/GHSA-4wc5-f2rc-q74m
- Ghsa updated
- 2026-10-19T17:06:48Z
- Ghsa id
- GHSA-4wc5-f2rc-q74m
- Last source
- FIRST EPSS
- Score
- 4.3
- Cvss version
- 3.1
- Cve id
- CVE-2026-111061
- Cvss vector
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- First seen by Signal
- 2026-10-19T19:31:52+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Published at
- 2026-10-19T17:17:03.080
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Explore deeper with Ninja Signal's threat intelligence graph