CVE-2026-40254
FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..
Reported by github_m · Published April 24, 2026
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| freerdp-server | Amazon Linux | 2:3.6.3-1.amzn2023.0.11 |
| libwinpr-devel | Amazon Linux | 2:3.6.3-1.amzn2023.0.11 |
| freerdp-devel | Amazon Linux | 2:3.6.3-1.amzn2023.0.11 |
| freerdp-libs | Amazon Linux | 2:3.6.3-1.amzn2023.0.11 |
| freerdp | freerdp | 3.25.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| FreeRDP | FreeRDP | < 3.25.0 |
| amazon:2023 | freerdp-server | 0 |
| amazon:2023 | libwinpr-devel | 0 |
| amazon:2023 | freerdp-devel | 0 |
| amazon:2023 | freerdp-libs | 0 |
| amazon:2023 | freerdp | 0 |
| amazon:2023 | libwinpr | 0 |
| FreeRDP | FreeRDP | 0 |
Timeline
- Apr 22, 2026 CVE Published
- May 18, 2026 EPSS Score (30 in total, the first dated here)
- Jul 18, 2026 Coalition ESS Score
- Jul 28, 2026 CVE Updated
- Aug 11, 2026 Distribution Patch
- Aug 11, 2026 Security Advisory (3 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-40254
vulnetix vdb fixes CVE-2026-40254
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-40254/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-3xpj-m4hx-8vmx x_refsource_CONFIRM