Skip to main content
Vulnerability Database/CVE-2026-102820

CVE-2026-102820: Pageant Buffer Overflow Vulnerability

CVE-2026-102820 is a buffer overflow flaw in the Windows pageant crate that allows local attackers to crash clients and expose memory. This post explains its technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-102820 Overview

CVE-2026-102820 is an out-of-bounds read vulnerability [CWE-125] in the pageant crate used by the russh SSH client library on Windows. The pageant/src/wmmessage.rsMemoryMap::read function trusts a peer-controlled u32 response length delivered through the 8192-byte Pageant shared-memory mapping reached by AgentClient::connect_pageant. A local process that impersonates the Pageant window can make query_pageant_direct allocate up to approximately 4 GiB and copy beyond the mapped view. This reliably crashes a russh client and can conditionally expose adjacent committed memory. The issue is fixed in pageant version 0.2.3.

Critical Impact

A local attacker impersonating the Pageant window can crash any russh-based SSH client on Windows and potentially disclose adjacent process memory, including sensitive SSH session data.

Affected Products

  • russh Rust SSH library (Windows targets)
  • pageant crate prior to version 0.2.3
  • Applications using AgentClient::connect_pageant for SSH agent forwarding on Windows

Discovery Timeline

  • 2026-09-29 - CVE-2026-102820 published to the National Vulnerability Database (NVD)
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-102820

Vulnerability Analysis

The pageant crate implements a Windows named-window IPC channel used by SSH clients to communicate with a running Pageant SSH agent. Communication occurs over an 8192-byte file mapping shared between the client and the agent process. When the client reads a response, MemoryMap::read accepts a length value supplied by the peer without verifying that the requested read stays within the mapped region.

An attacker with the ability to run code on the same interactive session can register a window that impersonates Pageant. When a russh-based client calls query_pageant_direct, the malicious window returns a response header specifying a length up to u32::MAX (approximately 4 GiB). The client allocates a buffer of that size and then copies data from the 8192-byte mapping beyond its bounds. The resulting access violation crashes the client. Depending on the process memory layout, adjacent committed pages may be read into the destination buffer before the fault occurs, disclosing memory that could include SSH keys or session material.

Root Cause

The root cause is missing bounds validation in MemoryMap::read. The function accepts the caller-supplied n: usize and issues std::ptr::copy_nonoverlapping without confirming that self.pos + n <= self.length. Because self.length is a fixed 8192-byte mapping, any peer-controlled length larger than the remaining mapped bytes produces an out-of-bounds read.

Attack Vector

Exploitation requires local code execution in the same interactive session as the victim SSH client. The attacker creates a window with the class name and title Pageant uses, then waits for the russh client to send a WM_COPYDATA message. The attacker replies with a crafted length header, triggering the oversized allocation and out-of-bounds copy on the victim side.

rust
// Patch from pageant 0.2.3 - pageant/src/wmmessage.rs
// Source: https://github.com/Eugeny/russh/commit/5d566989ebabfdebfe6b33243d31765a0812260b

-    fn read(&mut self, n: usize) -> Vec<u8> {
+    fn read(&mut self, n: usize) -> Result<Vec<u8>, Error> {
+        if self.pos.checked_add(n).is_none_or(|end| end > self.length) {
+            return Err(Error::Overflow);
+        }
         let out = vec![0; n];
         unsafe {
             std::ptr::copy_nonoverlapping(

The patch introduces a checked bounds test before allocation. If pos + n overflows or exceeds the 8192-byte mapping length, the function returns Error::Overflow instead of performing the unsafe copy.

Detection Methods for CVE-2026-102820

Indicators of Compromise

  • Unexpected termination or access-violation crashes of applications built on russh on Windows hosts
  • Presence of unknown processes registering windows using the Pageant class name while a legitimate Pageant instance is not running
  • Large transient virtual-memory allocations (near 4 GiB) originating from SSH client processes

Detection Strategies

  • Inventory Rust binaries and applications that depend on russh or the pageant crate at versions prior to 0.2.3
  • Monitor for process crash telemetry (Windows Error Reporting, WER dumps) affecting known russh-based clients
  • Alert on non-Pageant processes that create windows matching Pageant's window class or title strings

Monitoring Recommendations

  • Collect endpoint process and window-creation telemetry on developer and administrator workstations that use SSH agent forwarding
  • Correlate SSH client crashes with concurrent process launches in the same interactive session to identify impersonation attempts
  • Track outbound SSH sessions initiated after client crashes to identify possible key or session material reuse

How to Mitigate CVE-2026-102820

Immediate Actions Required

  • Upgrade the pageant crate to version 0.2.3 or later in all dependent projects and rebuild affected binaries
  • Update russh to release v0.63.2, which incorporates the fixed pageant dependency
  • Audit Windows workstations for russh-based SSH tooling and prioritize patching on shared or multi-user hosts

Patch Information

The fix is delivered in pageant 0.2.3 and bundled in russh release v0.63.2. The corrective change is in commit 5d566989ebabfdebfe6b33243d31765a0812260b and is documented in the GitHub Security Advisory GHSA-g4mp-vgx3-xrvm. The patch adds an overflow-checked bounds test in MemoryMap::read and returns Error::Overflow when the requested length exceeds the mapped view.

Workarounds

  • Disable Pageant integration in russh-based clients where SSH agent forwarding is not required
  • Restrict interactive logon on hosts running affected SSH clients so untrusted processes cannot register competing windows
  • Prefer alternative SSH agent transports such as OpenSSH's Windows agent named pipe until affected binaries are rebuilt with the patched crate
bash
# Update the pageant dependency in a Rust project
cargo update -p pageant --precise 0.2.3

# Or bump russh to a version that pulls the fixed pageant crate
cargo update -p russh --precise 0.63.2

# Verify no vulnerable versions remain in the dependency tree
cargo tree -p pageant

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.