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

CVE-2026-109677: FreeRDP Buffer Overflow Vulnerability

CVE-2026-109677 is a buffer overflow flaw in FreeRDP that enables malicious RDP servers to leak heap memory and potentially bypass ASLR protections. This post covers the technical details, affected versions, security impact, and mitigation strategies.

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-109677 Overview

CVE-2026-109677 is an out-of-bounds read vulnerability in FreeRDP, an open-source implementation of the Remote Desktop Protocol (RDP). The flaw exists in smartcard_LocateCardsByATRA_Call because the cbAtr byte count in the Answer-To-Reset (ATR) pattern is not capped against the fixed rgbAtr array size. A malicious RDP server can send crafted ATR mask arrays and use query timing as an oracle, leaking adjacent heap memory bit-by-bit. The leak defeats Address Space Layout Randomization (ASLR) and aids remote code execution exploits against connecting FreeRDP clients. The issue is tracked as [CWE-125] and affects versions from 2.0.0-beta1 before 3.28.0.

Critical Impact

A hostile RDP server can incrementally exfiltrate heap memory from a connecting FreeRDP client, breaking ASLR and enabling follow-on remote code execution.

Affected Products

  • FreeRDP versions 2.0.0-beta1 through 3.27.x
  • FreeRDP client implementations using the smartcard redirection channel
  • Downstream distributions and applications bundling vulnerable FreeRDP libraries

Discovery Timeline

  • 2026-10-13 - CVE-2026-109677 published to the National Vulnerability Database
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109677

Vulnerability Analysis

The FreeRDP smartcard redirection channel implements [MS-RDPESC], the Microsoft protocol for smartcard device redirection over RDP. The LocateCardsByATR call lets a server ask the client whether any inserted smartcard matches a supplied list of ATR patterns and masks. Each pattern is represented by a LocateCards_ATRMask structure containing cbAtr (byte count), rgbAtr (fixed 36-byte ATR array), and rgbMask (fixed 36-byte mask array).

FreeRDP read cbAtr directly from the wire without validating it against the size of the fixed arrays. During pattern comparison, the client walks cbAtr bytes through rgbAtr and rgbMask, reading well past the structure when the attacker supplies values greater than 36. The protocol specification caps cbAtr at 36, but the code trusted the attacker-controlled value.

Root Cause

The root cause is missing bounds validation on a length field deserialized from untrusted network input [CWE-125]. The affected function smartcard_ndr_read_LocateCards_ATRMask populated a LocateCards_ATRMask array without enforcing that masks[x].cbAtr <= ARRAYSIZE(masks[x].rgbAtr). Any downstream byte-by-byte comparison against rgbAtr or rgbMask therefore reads heap memory outside the intended object.

Attack Vector

Exploitation requires a victim to initiate an RDP connection to an attacker-controlled server and the smartcard redirection channel to be negotiated. The server replies to a LocateCardsByATR request with crafted LocateCards_ATRMask entries whose cbAtr fields exceed 36. The server infers whether the overread bytes match the supplied mask by measuring the client's response timing, turning the overread into a bit-by-bit oracle. Iterating the oracle leaks heap contents such as pointers, defeating ASLR and enabling reliable follow-on memory corruption exploits.

c
		BYTE** ppv;
	} u;
	u.ppc = data;
-	return smartcard_ndr_read(log, s, u.ppv, min, sizeof(LocateCards_ATRMask), type);
+	const LONG status = smartcard_ndr_read(log, s, u.ppv, min, sizeof(LocateCards_ATRMask), type);
+	if (status != SCARD_S_SUCCESS)
+		return status;
+
+	/* [MS-RDPESC] 2.2.1.5: cbAtr is range(0..36), the number of valid bytes in the fixed
+	 * rgbAtr/rgbMask arrays. A larger value walks past them when the mask is compared byte
+	 * by byte, so reject it here rather than trusting the wire value. */
+	const LocateCards_ATRMask* masks = *data;
+	for (size_t x = 0; x < min; x++)
+	{
+		if (masks[x].cbAtr > ARRAYSIZE(masks[x].rgbAtr))
+		{
+			WLog_Print(log, WLOG_ERROR,
+			           "LocateCards_ATRMask[%" PRIuz "]::cbAtr %" PRIu32 " exceeds %" PRIuz, x,
+			           masks[x].cbAtr, (size_t)ARRAYSIZE(masks[x].rgbAtr));
+			free(*data);
+			*data = nullptr;
+			return STATUS_DATA_ERROR;
+		}
+	}
+	return SCARD_S_SUCCESS;

Source: GitHub FreeRDP Commit ececc5cbd0. The patch adds a loop that validates each cbAtr against ARRAYSIZE(masks[x].rgbAtr) and returns STATUS_DATA_ERROR if the wire value exceeds the fixed array size.

Detection Methods for CVE-2026-109677

Indicators of Compromise

  • Outbound RDP connections from workstations to untrusted or newly registered external IP addresses on TCP/3389.
  • Smartcard redirection channel (rdpdr / SCARD) activity on sessions to servers outside the organization.
  • FreeRDP client logs containing repeated smartcard_LocateCardsByATRA_Call operations with abnormal timing patterns.

Detection Strategies

  • Inspect RDP channel negotiation to flag sessions where clients running FreeRDP open the smartcard redirection virtual channel against external destinations.
  • Alert on FreeRDP client processes connecting to Internet-reachable RDP endpoints, which is uncommon in most enterprises.
  • Hunt for LocateCardsByATR traffic that contains ATR mask arrays with cbAtr values greater than 36, indicating an exploit attempt.

Monitoring Recommendations

  • Baseline the installed FreeRDP versions across Linux and macOS endpoints and alert on versions below 3.28.0.
  • Capture crash telemetry and WLog error output from FreeRDP for signs of malformed smartcard PDUs or heap read faults.
  • Monitor egress firewalls for RDP sessions originating from server, developer, and admin workstations to non-corporate IP space.

How to Mitigate CVE-2026-109677

Immediate Actions Required

  • Upgrade FreeRDP to version 3.28.0 or later on all affected systems, including applications that statically or dynamically link the library.
  • Audit third-party software distributions that embed FreeRDP (remote-access clients, thin-client images, container images) and apply vendor updates.
  • Restrict outbound RDP (TCP/3389 and UDP/3389) from user endpoints to only approved internal destinations.

Patch Information

The fix is committed as ececc5cbd0646ef012ca178322e6ef922a11f0c1 and shipped in FreeRDP 3.28.0. See the upstream GitHub Security Advisory GHSA-8m97-wwx3-r8vj and the VulnCheck Out-of-Bounds Read Advisory for complete references.

Workarounds

  • Disable smartcard redirection in FreeRDP client invocations until the patched release is deployed.
  • Block outbound RDP at the perimeter and require RDP access through a hardened jump host or gateway.
  • Train users to connect only to known, trusted RDP endpoints and to decline unexpected RDP connection prompts.
bash
# Launch FreeRDP without smartcard redirection as an interim mitigation
xfreerdp3 /v:<trusted-host> /cert:tofu \
  -smartcard \
  /dynamic-resolution

# Verify installed FreeRDP version is 3.28.0 or later
xfreerdp3 --version

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.