CVE-2026-40254 FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..

Medium 4.2 Published Updated

A rogue RDP server can read or write files outside the shared folder via path traversal if drive redirection is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-40254?

CVE-2026-40254 is a medium-severity path traversal vulnerability in Freerdp Freerdp, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

FreeRDP is a free implementation of the Remote Desktop Protocol. Versions prior to 3.25.0 have an off-by-one in the path traversal filter in `channels/drive/client/drive_file.c`. The `contains_dotdot()` function catches `../` and `..\` mid-path but misses `..` when it's the last component with no trailing separator. A rogue RDP server can read, list, or write files one directory above the client's shared folder through RDPDR requests. This requires the victim to connect with drive redirection enabled. Version 3.25.0 patches the issue.

Weakness: CWE-193

Which versions are affected by CVE-2026-40254?

It affects 1 product.

Linux distribution packages (1)
freerdp openSUSE:TumbleweedAll versions3.26.0-1.1

Products include Freerdp Freerdp.

How do I fix CVE-2026-40254?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40254 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40254 exists.

All Freerdp Freerdp vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-40254, GHSA-3xpj-m4hx-8vmx, UBUNTU-CVE-2026-40254, openSUSE-SU-2026:10832-1.

Is CVE-2026-40254 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free