Skip to main content

CVE-2026-116794 — Vulnerability in russh — CVE Details

HIGH

russh: Agent server never calls `Agent::confirm`, so keys added with the confirm constraint (`ssh-add -c`) sign without confirmation

Published October 30, 2026Updated November 12, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.15%). Schedule for your next planned update.

Does your project use an affected russh version?

Paste your Cargo.lock to check it for CVE-2026-116794 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

Summary

The agent server in russh::keys::agent::server never calls Agent::confirm before signing with a key that was added with the confirm constraint. That constraint is SSH_AGENT_CONSTRAIN_CONFIRM (RFC 9987 §5.2.7.2), which is what ssh-add -c sends.

The call was replaced by a hard-coded true in 3e04597 ("Native async traits encore", #455), first released in 0.50.0-beta.12. Every release since, up to and including 0.64.1, signs requests for confirm-constrained keys without asking the Agent implementation. A user who added a key with -c is therefore never asked to confirm.

Details

Connection::try_sign notes that the key needs confirmation, then awaits a ready future instead of the agent (server.rs L348-L360 at v0.64.1):

let agent = if needs_confirm {
    let (agent, ok) = {
        let _pk = key.clone();
        Box::new(futures::future::ready((agent, true)))
    }
    .await;
    if !ok {
        return Ok((agent, false));
    }
    agent
} else {
    agent
};

Before 3e04597 the first statement was let (agent, ok) = agent.confirm(key.clone()).await;.

try_sign was checked in the published crates on crates.io:

  • Every russh release from 0.50.0-beta.12 to 0.64.1 (52 versions) has the hard-coded true.
  • russh 0.50.0-beta.8 to beta.11 call agent.confirm.
  • Earlier russh releases have no agent server. It lived in russh-keys, and no russh-keys release is affected.

Not affected:

  • Agent implementations that keep the default confirm, which returns true anyway.
  • Checks made in Agent::confirm_request, which is still called with MessageType::Sign for every sign request (L158-L159).
  • The agent client, and the SSH client and server.

PoC

  1. Add this test to mod test in russh/src/keys/mod.rs. It uses the module's existing Incoming helper and ED25519_KEY.
  2. Run cargo test -p russh --lib keys::test::test_agent_confirms_keys_added_with_the_confirm_constraint.
#[tokio::test]
#[cfg(unix)]
async fn test_agent_confirms_keys_added_with_the_confirm_constraint() {
    use std::sync::atomic::{AtomicUsize, Ordering};

    // An agent whose user refuses every confirmation prompt.
    #[derive(Clone)]
    struct Refuse(std::sync::Arc<AtomicUsize>);
    impl agent::server::Agent for Refuse {
        fn confirm(
            self,
            _: std::sync::Arc<PrivateKey>,
        ) -> Box<dyn Future<Output = (Self, bool)> + Send + Unpin> {
            self.0.fetch_add(1, Ordering::SeqCst);
            Box::new(futures::future::ready((self, false)))
        }
    }

    let prompts = std::sync::Arc::new(AtomicUsize::new(0));
    let dir = tempfile::tempdir().unwrap();
    let agent_path = dir.path().join("agent");
    let mut listener = tokio::net::UnixListener::bind(&agent_path).unwrap();
    let agent = Refuse(prompts.clone());
    tokio::spawn(async move {
        agent::server::serve(
            Incoming {
                listener: &mut listener,
            },
            agent,
        )
        .await
    });

    let key = decode_secret_key(ED25519_KEY, Some("blabla")).unwrap();
    let public = key.public_key().clone();
    let stream = tokio::net::UnixStream::connect(&agent_path).await.unwrap();
    let mut client = agent::client::AgentClient::connect(stream);
    // What `ssh-add -c` sends.
    client
        .add_identity(&key, &[agent::Constraint::Confirm])
        .await
        .unwrap();

    let signed = client
        .sign_request(&AgentIdentity::from(public), None, b"data".to_vec())
        .await;
    let confirm_calls = prompts.load(Ordering::SeqCst);
    assert!(
        signed.is_err(),
        "the agent signed with a confirm-constrained key without asking: \
         Agent::confirm was called {confirm_calls} time(s)"
    );
    assert_eq!(
        confirm_calls, 1,
        "Agent::confirm should be asked exactly once"
    );
}

On v0.64.1 (e5d80a0) the test fails:

the agent signed with a confirm-constrained key without asking: Agent::confirm was called 0 time(s)

With the fix below it passes, and so do all 46 keys:: tests.

Impact

A russh-based agent whose Agent::confirm asks the user, or applies any other check, signs every request for a confirm-constrained key without running that check. Anyone who can talk to the agent can then use the key without the user's approval:

  • other local processes of the user;
  • the remote host, when the agent is forwarded (ssh -A).

Preventing exactly this is the purpose of the confirm constraint. RFC 9987 §10 names it as what stops an attacker with access to the agent from "stealing use of those keys".

Because the agent accepts the constraint, ssh-add -c reports success and the user believes the key is protected. RFC 9987 §5.2.7 says an agent that does not support a constraint MUST refuse the key instead.

The private key itself is not exposed. The impact is unauthorized use of it for as long as the attacker can reach the agent: logging in to other hosts as the user, or signing data such as git commits.

Known affected downstream user (from its public code; not tested): Proton Pass desktop, which uses russh 0.62.7.

  • It adds every key with Constraint::Confirm (mod.rs L332).
  • It uses Agent::confirm as its "Pass is unlocked" check before signing, and defers MessageType::Sign from confirm_request to it (L75-L100). That check never runs.
  • Proton also removes keys from the agent on lock and logout (ssh-agent.middleware.ts L23-L27).

So the exposure there is limited to states in which keys stay loaded while Pass is not unlocked. Their own code notes, for example, that the agent persists across renderer reloads and account switches.

Suggested fix

--- a/russh/src/keys/agent/server.rs
+++ b/russh/src/keys/agent/server.rs
@@ -346,11 +346,7 @@ impl<S: AsyncRead + AsyncWrite + Send + Unpin + 'static, A: Agent + Send + Sync
             }
         };
         let agent = if needs_confirm {
-            let (agent, ok) = {
-                let _pk = key.clone();
-                Box::new(futures::future::ready((agent, true)))
-            }
-            .await;
+            let (agent, ok) = agent.confirm(key.clone()).await;
             if !ok {
                 return Ok((agent, false));
             }

When confirm returns false, try_sign returns false and the agent answers SSH_AGENT_FAILURE, as it did before the regression.

Compatibility note for the release notes: confirm is called again for confirm-constrained keys, so implementations that stub it out will now hit that stub.

  • For example, Litterbox implements confirm as todo!() (agent.rs L81-L87).
  • Each connection runs in its own task, so such a panic ends only that connection.

Related but separate: with the default confirm, the agent still accepts the confirm constraint without enforcing it. Given RFC 9987 §5.2.7, refusing such keys when the application does not implement confirm may be worth considering.

Advisory Timeline

  • First published October 30, 2026 (27 days ago).
  • Last revised November 12, 2026 — 12 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update russh to 0.65 or later
cargo update -p russh --precise 0.65

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
russh crates.io · Affected: All versions0.65

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-862
    Missing AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.4 score means for each attack dimension.

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

CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:N

Frequently Asked Questions

What is CVE-2026-116794?
russh: Agent server never calls `Agent::confirm`, so keys added with the confirm constraint (`ssh-add -c`) sign without confirmation. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.4/10).
How do I check if my project is affected by CVE-2026-116794?
CVE-2026-116794 affects russh. It has a 0.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-116794 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.4

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.15%
EPSS percentile: 2

This is a below-median EPSS score — only 2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-vp5q-ff62-jwqv
RUSTSEC-2026-0495

Related CVEs

  • CVE-2026-48110
    HIGH

    SSH message fields allocated before their size is checked

  • CVE-2026-42189
    HIGH

    Pre-authentication allocation from the keyboard-interactive response count

  • CVE-2026-102823
    HIGH

    russh: Client-side channel-scoped Handler callbacks fire for channel IDs the client never opened

  • CVE-2026-48110
    HIGH

    Russh SSH message fields were decoded through allocation-first parsers before field-specific bounds

  • CVE-2026-42189
    HIGH

    russh has pre-auth DoS via unbounded allocation in its keyboard-interactive auth handler

  • CVE-2026-46673
    HIGH

    Russh: Unchecked CryptoVec allocation and growth handling is reachable

  • CVE-2026-102821
    MEDIUM

    Russh: Unbounded memory exhaustion via CHANNEL_OPEN flood during a client-stalled rekey

  • CVE-2023-48795
    MEDIUM

    Prefix Truncation Attack against ChaCha20-Poly1305 and Encrypt-then-MAC aka Terrapin

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock