Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40254
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:24 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 24 Apr 2026, 02:24 UTC

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.

osv:CVE-2026-40254
Complete source record
{
  "id": "5759026e0dff23ab558a2f55606cc0b6cdbc5d24e7e4d6465e6cdc8c44a2a309",
  "url": "https://osv.dev/vulnerability/CVE-2026-40254",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..",
    "summary": "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.",
    "evidence": "osv:CVE-2026-40254",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-40254",
      "aliases": [
        "CVE-2026-40254",
        "GHSA-3xpj-m4hx-8vmx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/freerdp/freerdp",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "90e7f064dc3ab8672b8ec714059d8cd51be0743f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.25.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.25.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.5.1",
            "3.5.0",
            "3.4.0",
            "3.3.0",
            "3.2.0",
            "3.1.0",
            "3.0.0",
            "3.0.0-rc0",
            "3.0.0-beta4",
            "3.0.0-beta3",
            "3.0.0-beta2",
            "3.0.0-beta1",
            "2.0.0",
            "2.0.0-rc4",
            "2.0.0-rc3",
            "2.0.0-rc2",
            "2.0.0-rc1",
            "2.0.0-rc0",
            "2.0.0-beta1+android11",
            "2.0.0-beta1+android10",
            "1.2.0-beta1+android9",
            "1.2.0-beta1+android7",
            "1.1.0-beta+2013071101",
            "1.1.0-beta1+ios4",
            "1.1.0-beta1+android5",
            "1.1.0-beta1+android4",
            "1.1.0-beta1+ios3",
            "1.1.0-beta1+ios2",
            "1.1.0-beta1+android3",
            "1.1.0-beta1+android2",
            "1.1.0-beta1+ios1",
            "1.1.0-beta1",
            "1.0.1",
            "1.0.0",
            "1.0-beta5",
            "1.0-beta4",
            "1.0-beta2",
            "1.0-beta1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40254.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.286503146Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40254.json",
        "https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-3xpj-m4hx-8vmx",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40254"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-193"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40254.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40254",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509023,
  "published_at": "2026-04-24T02:24:50.794+00:00"
}