/

CVE-2026-73227

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in electerm RDP File Transfer

CVE-2026-73227

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Write

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in electerm's RDP clipboard file-transfer handling allows a malicious RDP server to influence where downloaded content is written. When the server-controlled filename is used without sufficient sanitization, files may be saved outside the user's selected destination directory.

Affected context

The issue occurs in electerm's RDP file-transfer functionality when an RDP server provides a clipboard download filename that is later resolved into a local filesystem path. Deployments are at risk when the client connects to an untrusted or compromised RDP server and the filename is not constrained to the intended save directory.

Exploit preconditions

  • Attack surface: RDP clipboard file-transfer handling
  • Required access: The attacker must control or compromise an RDP server to which electerm connects
  • Trigger point: Processing and saving a clipboard-download file supplied by the RDP server
  • Why exploitation is possible: The server-controlled filename is passed into path resolution without adequate traversal and destination-boundary checks

Why this happens

The underlying bug is an insufficiently constrained construction of a local filesystem path from attacker-influenced input. By using the RDP-provided filename without normalizing, validating, and verifying that the resulting path remains within the selected directory, directory traversal sequences can escape the intended destination. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Potential impact

  • Attacker-controlled content may be written outside the selected save directory
  • Existing files in writable locations may be overwritten
  • Sensitive application or user data could be damaged
  • Written files could contribute to further compromise if later trusted or executed

General mitigation guidance

Mitigation typically focuses on treating remote filenames as untrusted metadata and enforcing a destination-directory boundary before writing files.

Common defensive patterns include:

  • Normalize and validate filenames before constructing local paths
  • Reject absolute paths, traversal components, and platform-specific path escapes
  • Resolve the final path and verify that it remains beneath the intended directory
  • Generate application-controlled destination names where practical
  • Use a dedicated, minimally privileged download directory
  • Apply overwrite protections and explicit user confirmation for unexpected files
  • Keep RDP sessions and downloaded content isolated from sensitive user locations

How teams detect issues like this

Organizations commonly detect path traversal risks through:

  • Static analysis rules for filesystem APIs receiving remote or user-controlled path components
  • Code review checks for filename concatenation, path resolution, and missing destination-boundary validation
  • Tests using absolute paths, parent-directory components, encoded separators, and platform-specific path forms
  • Runtime policies that restrict file writes to approved directories
  • Monitoring for unexpected file creation or modification outside configured download locations

Automated code review and software composition analysis tools may help identify related patterns.

Sources

SourceLink
github.comgithub.com/electerm/electerm/commit/451bf3000672c00b0c3b148fbf3c148c205ce350
github.comgithub.com/electerm/electerm/releases/tag/v3.15.120
github.comgithub.com/electerm/electerm/security/advisories/GHSA-gm6q-5vpx-3mwf

Frequently asked

questions

Yes, in the relevant deployment scenario, a malicious or compromised RDP server can provide the attacker-controlled filename when an electerm client processes a clipboard file transfer.

The attacker generally needs control of, or influence over, an RDP server that the victim's electerm client connects to. Local filesystem permissions still determine which files can actually be written or overwritten.

Treat server-provided filenames as untrusted, constrain them to safe basename values or generated names, and verify that the resolved output path remains within the selected directory before writing.

Centralize secure path handling, test traversal and platform-specific path variants, restrict writable directories, and apply least-privilege permissions to the client process.

Find out what's already
exploitable in your codebase.