FreeRDP drive redirection bypasses shared root via sibling paths
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-8xqm-wp3f-rfp9. Fix status from GitHub.
Summary
FreeRDP up to and including 3.28.0 joins the configured drive redirection share root with a server-supplied path without checking that the path is rooted under the share. A non-rooted path can reach a sibling directory that shares the same string prefix (CWE-22). A malicious or compromised RDP server can exploit this after a user connects with drive redirection enabled and shares a local drive, exposing files in those sibling paths to reading, modification or disruption.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
## Suggested severity Medium Suggested CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L` Rationale: a malicious or compromised RDP server can trigger the issue over the network after a FreeRDP client connects with drive redirection enabled. User interaction is required because the victim must connect to the server and share a local drive/path. The reproduced impact is confidentiality, integrity, and availability over prefix-sibling paths outside the configured shared root, not arbitrary whole-filesystem access and not RCE. ## CWE - CWE-22: Improper Limitation of a Pathname to a Restricted Directory ## Affected versions Confirmed against: - Latest master: `8d3b86022f0d71aefa7bd2e466d2d391693a41b3` - Supported release checked: `3.28.0` I checked: ```bash git diff 3.28.0..HEAD -- channels/drive/client/drive_file.c channels/drive/client/drive_main.c ``` The diff is empty for the affected files, so the reproduced behavior applies to both current master and the supported `3.28.0` release. ## Summary FreeRDP drive redirection constructs local file paths by directly concatenating the configured shared root path with a server-supplied RDPDR path. The path helper filters `..` components, but it does not require the server path to be rooted under the share and does not insert a separator between the base path and the server path. For example, if the client shares: ```text /tmp/freerdp_drive_irp/share ``` then a malicious RDP server can send a non-rooted RDPDR path: ```text 2/secret.txt ``` FreeRDP combines this as: ```text /tmp/freerdp_drive_irp/share2/secret.txt ``` That path is outside the configured shared root but shares the same string prefix. This creates a shared-root boundary bypass for the redirected drive. This is not a memory corruption issue and I am not claiming remote code execution. The demonstrated scope is prefix-sibling paths, not arbitrary unrelated paths such as `/etc/passwd`. ## Affected code path The server-controlled path is read from the RDPDR Device I/O Request path field and reaches the drive file helper: - `channels/rdpdr/client/irp.c:irp_new()` - `channels/drive/client/drive_main.c:drive_process_irp()` - `channels/drive/client/drive_main.c:drive_process_irp_create()` - `channels/drive/client/drive_file.c:drive_file_new()` - `channels/drive/client/drive_file.c:drive_file_combine_fullpath()` The same helper is also reused by other drive file operations, including directory query, rename, write/create, and delete-related operations. The root cause is in `drive_file_combine_fullpath()`: it copies `base_path` and then copies the RDPDR path immediately after it. It later normalizes separators and rejects `..`, but the missing rooted-path/separator/containment check means a non-rooted path can escape to a sibling path with the same string prefix. ## Reproduction evidence I reproduced this locally in Docker with ASan/UBSan using FreeRDP source at: ```text 8d3b86022f0d71aefa7bd2e466d2d391693a41b3 ``` The strongest reproducer is a full RDPDR IRP replay harness. It builds RDPDR Device I/O Request streams, passes them through production `irp_new()` and `drive_process_irp()`, and parses the real RDPDR completion PDUs. Local harness: ```text docker_repro/freerdp_drive_path_prefix_irp_replay_harness.c ``` Local run log: ```text docker_repro/drive_path_prefix_irp_replay_asan_run.txt ``` Run command used: ```bash docker run --rm \ -v E:/vul-tower/audit_freerdp_20260707:/work/audit \ -w /work/audit \ freerdp-local-repro:20260707-icu \ bash -lc "LD_LIBRARY_PATH=docker_build_latest_asan/libfreerdp:docker_build_latest_asan/winpr/libwinpr ASAN_OPTIONS=detect_leaks=0 ./docker_repro/freerdp_drive_path_prefix_irp_replay_harness_asan" ``` Observed output: ```text irp_create path=2/secret.txt status=0x00000000 fileId=1 irp_read status=0x00000000 len=19 data=irp-outside-secret irp_close fileId=1 status=0x00000000 irp_create path=2/written_by_irp.txt status=0x00000000 fileId=2 irp_write status=0x00000000 written=10 irp_close fileId=2 status=0x00000000 irp_create path=2/delete_me.txt status=0x00000000 fileId=3 irp_set_delete status=0x00000000 irp_close fileId=3 status=0x00000000 irp_create path=/ status=0x00000000 fileId=4 irp_query_directory path=2/listed.txt status=0x00000000 irp_close fileId=4 status=0x00000000 summary irp_read=1 irp_write=1 irp_delete=1 irp_query=1 ``` The harness setup is: ```text shared root: /tmp/freerdp_drive_irp/share sibling path: /tmp/freerdp_drive_irp/share2 ``` The RDPDR replay confirms these operations outside the configured shared root: - read/open: `2/secret.txt` reads `/tmp/freerdp_drive_irp/share2/secret.txt` - write/create: `2/written_by_irp.txt` writes `/tmp/freerdp_drive_irp/share2/written_by_irp.txt` - delete: `2/delete_me.txt` plus `FileDispositionInformation` deletes `/tmp/freerdp_drive_irp/share2/delete_me.txt` - directory query: `2/listed.txt` succeeds against the sibling path Additional helper-level Docker/ASan harnesses also confirmed: - `drive_file_new()` can open/read from a prefix-sibling path. - `drive_file_query_directory()` can enumerate a prefix-sibling path. - `drive_file_set_information(... FileRenameInformation ...)` can rename a file from the share into a sibling path. - Windows-style non-rooted paths such as `2\file.txt` also escape after separator normalization. - Rooted paths such as `/2/file.txt` and `\2\file.txt` stay inside the configured shared root. - `/../...` traversal did not read outside in my harness; it triggered the existing invalid-path warning. ## Impact If a FreeRDP client connects to a malicious or compromised RDP server with drive redirection enabled, the server can access local paths outside the configured shared root when those paths share the root as a string prefix. Example: ```text Configured share: /home/user/share Reachable sibling examples: /home/user/share2, /home/user/share_backup, /home/user/shared ``` Confirmed operations include: - read/open - directory query/listing - write/create - rename into a sibling path - delete via `FileDispositionInformation` - sibling directory creation Limitations: - This does not demonstrate arbitrary whole-filesystem access. - This does not demonstrate RCE. - This requires drive redirection to be enabled and the client to connect to a malicious or compromised RDP server. ## Possible fix direction Possible defensive approaches: - Reject non-empty server paths that do not begin with `/` or `\`. - Insert exactly one separator between the configured base path and the remote path after stripping the remote leading separator. - Canonicalize the final path and verify it remains inside the configured shared root. This is especially important for symlinks/reparse points. I can provide the local Docker harnesses and ASan logs if useful. ## Reporter Bin Luo, UESTC
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FreeRDP (c/c++) | <= 3.28.0 | 3.29.0 | Patch available | GHSA-8xqm-wp3f-rfp9 |
- FreeRDP (c/c++) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-8xqm-wp3f-rfp9
Remediation
Upgrade FreeRDP to version 3.29.0, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-8xqm-wp3f-rfp9 FreeRDP (c/c++) Fixed in 3.29.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-8xqm-wp3f-rfp9
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences