Oct 1, 2026·5 min read·15 visits
Unvalidated 32-bit response length fields in the pageant crate allow a local process to cause an out-of-memory crash or perform out-of-bounds reads against russh-based clients.
A critical memory handling vulnerability exists in the pageant crate, a workspace component of the Rust-based russh SSH client library, during communication with the PuTTY Pageant SSH agent on Windows systems. Prior to version 0.2.3, the library's shared memory parsing logic blindly trusted a peer-controlled, 32-bit big-endian response length field. This allows local attackers running within the same user session to trigger out-of-bounds reads or execute an out-of-memory crash of the client application.
The pageant crate functions as a workspace utility inside the russh SSH client library, facilitating communications with the PuTTY Pageant SSH agent on Windows systems.
This communication depends on local Inter-Process Communication (IPC) involving Windows Messaging (WM_COPYDATA) and Shared Memory Map Views. The client establishes a shared file mapping with a static capacity constraint of 8,192 bytes (8 KiB) and passes this file name to the Pageant agent, which then writes responses directly to the shared space.
The vulnerability is located in the MemoryMap::read parser within the pageant/src/wmmessage.rs file. By failing to validate the boundaries of incoming messages, the parser exposes the client program's runtime memory to crashes or local information leaks. This flaw represents a severe design oversight when handling boundaries inside shared memory mappings.
The root cause of the vulnerability lies in the implementation of the MemoryMap::read stream reader and its interaction with the query_pageant_direct handler. When reading raw responses, the client first reads a 4-byte length prefix directly from the shared memory view, parsing it as a big-endian u32 value assigned to the variable size.
Because the peer process (which can be impersonated by any standard user process on the same desktop environment) fully controls this shared memory view, the size variable can be manipulated to contain arbitrary values. The library then executes MemoryMap::read(size) without validating whether the requested index range (self.pos + size) exceeds the physical size of the memory map (self.length), which is typically bounded at 8,192 bytes.
This lack of validation triggers two primary failure modes: first, an Out-of-Memory (OOM) abort via CWE-789 due to an excessive vector allocation size request; and second, an Out-of-Bounds Read (CWE-125) during the execution of std::ptr::copy_nonoverlapping inside an unsafe block. If the copy operation points to adjacent unmapped system space, the OS terminates the process with an access violation.
The sequence of IPC messaging and the interception point where a malicious local process triggers the crash are represented in the flowchart below.
This architecture highlights that the security of this local communication depends entirely on verifying boundary limits during the parsing phase, since the Windows Messaging API does not inherently isolate client-to-agent channel registrations within standard interactive sessions.
An inspection of the vulnerable source code confirms that raw pointer operations were executed without bounds checking.
Below is the vulnerable implementation of the reader function:
// VULNERABLE: Prior to pageant version 0.2.3
impl MemoryMap {
fn read(&mut self, n: usize) -> Vec<u8> {
let out = vec![0; n]; // CWE-789: Excessive memory allocation if 'n' is massive
unsafe {
std::ptr::copy_nonoverlapping(
self.ptr.add(self.pos),
out.as_ptr() as *mut u8,
n, // CWE-125: Out-of-bounds pointer copy if 'self.pos + n' > self.length
);
}
self.pos += n;
out
}
}To address this vulnerability, the maintainers refactored the function's signature and introduced boundary validation checks:
// PATCHED: pageant version 0.2.3
impl MemoryMap {
fn read(&mut self, n: usize) -> Result<Vec<u8>, Error> {
// Validate bounds and prevent integer overflow using checked_add
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(
self.ptr.add(self.pos),
out.as_ptr() as *mut u8,
n,
);
}
self.pos += n;
Ok(out)
}
}This patch adds robust boundary checking. Using checked_add prevents integer wrapping attacks when calculating memory offsets, and checking end > self.length prevents reads from exceeding the size of the 8,192-byte file mapping. These modifications ensure that memory is only allocated if the request falls within the active map boundaries.
Exploiting this flaw requires local code execution within the victim's Windows session. This scenario is common in shared development server environments or terminal environments containing multi-user services.
An attacker can register a window class matching the standard name of the legitimate PuTTY Pageant program (Pageant). If the genuine Pageant agent is not running, the victim client's call to connect_pageant will target the malicious window handle. When the client transmits a request and waits for an answer, the attacker-controlled window receives the notification, writes a payload containing 0xFFFFFFFF into the first four bytes of the shared mapping, and signals the client to resume.
Upon parsing this length, the client allocates a 4 GiB buffer. Because standard 32-bit and some 64-bit user processes lack the memory allocation headroom for an immediate block allocation of this scale, the memory manager aborts the program. If the attacker specifies a size exceeding the remaining unread buffer but within system allocation limits, the copy_nonoverlapping function reads adjacent heap memory, exposing potential secrets if the application subsequently processes, logs, or transmits this data.
The CVSS vector is rated as CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, yielding a severity score of 6.2.
The attack vector is local (AV:L) because triggering the condition requires interacting with local Windows API messaging loops. Attack complexity is low (AC:L) because standard programmatic window registration and shared memory access do not require advanced administrative rights on Windows systems.
While the official classification rates Confidentiality Impact as None (C:N), the presence of an out-of-bounds pointer copy operation means that adjacent heap contents could be copied into the output vector. Depending on how the client application processes error buffers, this could lead to the exposure of other private SSH keys or session structures.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
pageant Eugeny | < 0.2.3 | 0.2.3 |
russh Eugeny | >= 0.58.0, < 0.63.2 | 0.63.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-125, CWE-789 |
| Attack Vector | Local |
| CVSS v3.1 Score | 6.2 (Medium) |
| EPSS Score | 0.00129 (0.129% probability) |
| Impact | Denial of Service (DoS) and potential Information Disclosure |
| Exploit Status | poc |
| KEV Status | Not Listed |
The software reads data past the end, or before the beginning, of the intended buffer, or allocates memory with an excessive size value.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.
A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.