
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40254 is a path traversal vulnerability in FreeRDP caused by an off-by-one error in the contains_dotdot() function within channels/drive/client/drive_file.c. It affects all FreeRDP versions up to and including 3.24.2, and was patched in version 3.25.0. The vulnerability was published on April 24, 2026, and allows a rogue RDP server to read, list, or write files one directory above the client's shared folder when drive redirection is enabled. The CVSS v3.1 base score is 6.1 (Medium) per NVD, while the GitHub advisory rates it 4.2 (Moderate) (GitHub Advisory, Red Hat Bugzilla).
The root cause is an off-by-one error (CWE-193) in the contains_dotdot() function that results in a path traversal weakness (CWE-22). Specifically, at line 111 of drive_file.c, the condition if (tst + 2 < path + path_length) uses a strict less-than comparison, which evaluates to false when a path ends with .. (e.g., /shared/..) because tst + 2 equals path + path_length exactly. The function correctly blocks mid-path traversal sequences like ../ or ..\ but fails to detect .. as the terminal path component with no trailing separator. A rogue RDP server can exploit this by issuing RDPDR I/O requests (open, list, read, write) using paths ending in .., escaping the shared drive root by one directory level. Exploitation requires the victim to have connected with drive redirection enabled (e.g., xfreerdp /v:evil.server /drive:work,/home/user/documents) (GitHub Advisory).
A rogue RDP server can read, list, or write files in the directory immediately above the client's shared folder through RDPDR requests, resulting in limited but unauthorized information disclosure and file modification. The confidentiality and integrity impacts are low — an attacker can access one directory level above the shared root, not arbitrary filesystem locations. Availability is not impacted. The scope is changed in the NVD scoring, reflecting that the vulnerable client component affects resources outside its immediate security boundary (GitHub Advisory, Red Hat Bugzilla).
A proof-of-concept C program is included in the GitHub security advisory, demonstrating that /shared/.. bypasses the contains_dotdot() filter while /shared/../secret is correctly blocked. The PoC confirms the bug exists but does not provide a full end-to-end exploit against a live FreeRDP server. There is no evidence of active in-the-wild exploitation or threat actor attribution at this time. The EPSS score is approximately 0.028% (0.000280), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA KEV catalog (GitHub Advisory).
xfreerdp /v:evil.server /drive:work,/home/user/documents... without a trailing separator (e.g., /work/..), which bypasses the contains_dotdot() filter due to the off-by-one error./home/user/ instead of /home/user/documents) (GitHub Advisory)... without a trailing separator./sharename/..; unexpected file access events in the parent directory of the configured shared folder./home/user/documents is shared, watch for changes in /home/user/).xfreerdp or other FreeRDP client processes connected to unfamiliar RDP server addresses with /drive: arguments in the command line (GitHub Advisory).Upgrade FreeRDP to version 3.25.0 or later, which fixes the off-by-one error by adding an end-of-string check before inspecting the character following ... As a workaround for systems that cannot be immediately patched, disable drive redirection in RDP client configurations unless strictly necessary. Additionally, restrict RDP connections to trusted, verified servers and monitor RDPDR activity for suspicious file access patterns targeting parent directories of shared folders (GitHub Advisory, Red Hat Bugzilla).
The vulnerability was reported by a researcher credited as "Medoedus" and published by FreeRDP maintainer akallabeth via GitHub's security advisory system. Red Hat tracked the issue via Bugzilla and the Red Hat CVE advisory page. Coverage appeared in Linux-focused outlets including Pro-Linux.de and LinuxCompatible, and the fix was included in downstream distributions such as Fedora, Amazon Linux 2023, and Debian 13.5. The WebProNews article on FreeRDP 3.25 highlighted the release's security fixes alongside new features like AV1 video and FIDO2 redirection (GitHub Advisory, Red Hat CVE).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."