/

CVE-2026-66050

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in NitroShare LAN File Server

CVE-2026-66050

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write Leading to Code Execution

Severity:

HIGH RISK

(7.5)

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

NitroShare Desktop's LAN file transfer server trusts attacker-supplied filenames, allowing directory traversal sequences in JSON headers to escape the configured transfer root.

On a shared network, an unauthenticated attacker can write arbitrary files anywhere the NitroShare user has write access, including locations such as the Windows Startup folder, enabling persistent code execution on next login.

NitroShare Desktop's LAN file transfer server trusts attacker-supplied filenames, allowing directory traversal sequences in JSON headers to escape the configured transfer root.

On a shared network, an unauthenticated attacker can write arbitrary files anywhere the NitroShare user has write access, including locations such as the Windows Startup folder, enabling persistent code execution on next login.

Affected context

This vulnerability affects NitroShare Desktop deployments running the LAN file transfer server, particularly when the application accepts incoming transfers from untrusted peers on the same network.

The issue manifests when the server constructs destination paths directly from the JSON item header name field without normalizing or enforcing confinement to a designated transfer root directory.

Environments where the NitroShare process has write access to sensitive filesystem locations (for example, user startup folders, application directories, or configuration paths) are at elevated risk.

This vulnerability affects NitroShare Desktop deployments running the LAN file transfer server, particularly when the application accepts incoming transfers from untrusted peers on the same network.

The issue manifests when the server constructs destination paths directly from the JSON item header name field without normalizing or enforcing confinement to a designated transfer root directory.

Environments where the NitroShare process has write access to sensitive filesystem locations (for example, user startup folders, application directories, or configuration paths) are at elevated risk.

Exploit preconditions

  • Attack surface: NitroShare LAN file transfer server listening for incoming connections on the local network.
  • Required access: Network-level ability to connect to the NitroShare service; no prior authentication or local OS access needed.
  • Trigger point: Sending a crafted file transfer request whose JSON item header name field contains directory traversal sequences (e.g., .. components) targeting paths outside the transfer root.
  • Why exploitation is possible: The server does not sanitize, normalize, or validate incoming filenames before constructing filesystem paths, allowing attacker-controlled paths to escape the intended directory and land in arbitrary writable locations.
  • Attack surface: NitroShare LAN file transfer server listening for incoming connections on the local network.
  • Required access: Network-level ability to connect to the NitroShare service; no prior authentication or local OS access needed.
  • Trigger point: Sending a crafted file transfer request whose JSON item header name field contains directory traversal sequences (e.g., .. components) targeting paths outside the transfer root.
  • Why exploitation is possible: The server does not sanitize, normalize, or validate incoming filenames before constructing filesystem paths, allowing attacker-controlled paths to escape the intended directory and land in arbitrary writable locations.

Why this happens

The underlying bug stems from unsafe handling of filesystem paths derived from untrusted input, corresponding to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

NitroShare's server logic directly combines user-supplied filename elements from JSON headers with a base directory, but fails to normalize paths or enforce a strict restriction to the designated transfer root.

As a result, directory traversal tokens (../ and similar sequences) are interpreted by the filesystem, enabling attackers to reach arbitrary directories the process can write to, including those that influence startup behavior or application execution.

The underlying bug stems from unsafe handling of filesystem paths derived from untrusted input, corresponding to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

NitroShare's server logic directly combines user-supplied filename elements from JSON headers with a base directory, but fails to normalize paths or enforce a strict restriction to the designated transfer root.

As a result, directory traversal tokens (../ and similar sequences) are interpreted by the filesystem, enabling attackers to reach arbitrary directories the process can write to, including those that influence startup behavior or application execution.

Potential impact

  • Attackers may write arbitrary files to any location the NitroShare user account can modify.
  • Malicious binaries or scripts could be placed in the Windows Startup folder, enabling code execution on the next user login.
  • Existing configuration or application files may be overwritten, which could lead to tampering, data corruption, or indirect execution paths.
  • Sensitive directories such as user profiles, application data, or document folders could be polluted with attacker-controlled content.
  • The system may experience persistence of malware or backdoors established through startup or auto-run mechanisms.
  • Attackers may write arbitrary files to any location the NitroShare user account can modify.
  • Malicious binaries or scripts could be placed in the Windows Startup folder, enabling code execution on the next user login.
  • Existing configuration or application files may be overwritten, which could lead to tampering, data corruption, or indirect execution paths.
  • Sensitive directories such as user profiles, application data, or document folders could be polluted with attacker-controlled content.
  • The system may experience persistence of malware or backdoors established through startup or auto-run mechanisms.

General mitigation guidance

Effective mitigation focuses on enforcing strict directory confinement and treating all path components from the network as untrusted.

Common defensive patterns include:

  • Normalizing and validating received filenames, rejecting any input containing directory traversal sequences or absolute paths.
  • Resolving candidate paths against the intended transfer root and verifying that the resulting canonical path remains within that directory before performing any file operations.
  • Using whitelists or controlled mapping for destination filenames instead of accepting arbitrary names from clients.
  • Running the NitroShare process under an account with minimal filesystem privileges, limiting write access to non-sensitive directories.
  • Separating the transfer storage area from system and startup directories and applying OS-level permissions to enforce that separation.

Effective mitigation focuses on enforcing strict directory confinement and treating all path components from the network as untrusted.

Common defensive patterns include:

  • Normalizing and validating received filenames, rejecting any input containing directory traversal sequences or absolute paths.
  • Resolving candidate paths against the intended transfer root and verifying that the resulting canonical path remains within that directory before performing any file operations.
  • Using whitelists or controlled mapping for destination filenames instead of accepting arbitrary names from clients.
  • Running the NitroShare process under an account with minimal filesystem privileges, limiting write access to non-sensitive directories.
  • Separating the transfer storage area from system and startup directories and applying OS-level permissions to enforce that separation.

How teams detect issues like this

Detection efforts can focus on both code-level signals and runtime behavior.

From a static analysis and review perspective:

  • Flag patterns where network or JSON input is concatenated directly into filesystem paths.
  • Look for file creation or write calls that use unvalidated client-provided names without normalization or path checks.
  • Enforce coding guidelines requiring canonical path resolution and directory confinement for any file server component.

At runtime:

  • Monitor application logs and OS audit trails for unexpected writes to startup folders or other sensitive directories originating from the NitroShare process.
  • Employ host-based intrusion detection that alerts on new executables or scripts appearing in auto-start locations.
  • Integrate automated security scanners or code review tools configured with rules for CWE-22 to regularly review the file transfer implementation.

Detection efforts can focus on both code-level signals and runtime behavior.

From a static analysis and review perspective:

  • Flag patterns where network or JSON input is concatenated directly into filesystem paths.
  • Look for file creation or write calls that use unvalidated client-provided names without normalization or path checks.
  • Enforce coding guidelines requiring canonical path resolution and directory confinement for any file server component.

At runtime:

  • Monitor application logs and OS audit trails for unexpected writes to startup folders or other sensitive directories originating from the NitroShare process.
  • Employ host-based intrusion detection that alerts on new executables or scripts appearing in auto-start locations.
  • Integrate automated security scanners or code review tools configured with rules for CWE-22 to regularly review the file transfer implementation.

Sources

SourceLink
github.comgithub.com/cduram/NotCVE-2026-0009
vulncheck.comvulncheck.com/advisories/nitroshare-desktop-path-traversal-via-lan-file-transfer-server

Frequently asked

questions

Exploitation is limited to attackers who can reach the NitroShare LAN file transfer server on the same network, but within that scope it is unauthenticated and can be reliably abused to write files wherever the NitroShare user has write permissions.

No local OS access is required. An attacker only needs network connectivity to the NitroShare service and the ability to send crafted transfer requests; exploitation happens over the LAN.

The safest pattern is to treat all incoming path components as untrusted, normalize them, and enforce directory confinement by verifying that the resolved path remains strictly under the intended transfer root. Any input containing traversal sequences or absolute paths should be rejected.

Adopt secure-by-default file handling APIs, mandate canonical path resolution and checks in coding standards, minimize filesystem privileges for network services, and use static analysis or code review policies specifically geared toward detecting CWE-22 and arbitrary file write patterns.

Exploitation is limited to attackers who can reach the NitroShare LAN file transfer server on the same network, but within that scope it is unauthenticated and can be reliably abused to write files wherever the NitroShare user has write permissions.

No local OS access is required. An attacker only needs network connectivity to the NitroShare service and the ability to send crafted transfer requests; exploitation happens over the LAN.

The safest pattern is to treat all incoming path components as untrusted, normalize them, and enforce directory confinement by verifying that the resolved path remains strictly under the intended transfer root. Any input containing traversal sequences or absolute paths should be rejected.

Adopt secure-by-default file handling APIs, mandate canonical path resolution and checks in coding standards, minimize filesystem privileges for network services, and use static analysis or code review policies specifically geared toward detecting CWE-22 and arbitrary file write patterns.

Find out what's already
exploitable in your codebase.