---
title: "CWE-1386: Insecure Operation on Windows Junction / Mount Point"
url: https://radicalnotion.ai/cwe/cwe-1386
type: cwe
description: "The product opens a file or directory, but it does not properly prevent the name from being associated with a junction or mount point to a destination that is outside of the intended control sphere."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1386: Insecure Operation on Windows Junction / Mount Point

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 20
- **Of those, in CISA KEV:** 0
- **New in 2026:** 5
- **CWE catalog version:** 4.21

## Description

The product opens a file or directory, but it does not properly prevent the name from being associated with a junction or mount point to a destination that is outside of the intended control sphere.

If a file is used by a privileged program, but it can be replaced with a hard link to a sensitive file (e.g., AUTOEXEC.BAT), an attacker could escalate privileges. When the process opens the file, the attacker can assume the privileges of that process, tricking the privileged process to read, modify, or delete the sensitive file, preventing the program from accurately processing data. Note that one can also point to registries and semaphores.

## Background

In Windows, NTFS5 allows for file system objects called reparse points. Applications can create a hard link from one directory to another directory, called a junction point. They can also create a mapping from a directory to a drive letter, called a mount point.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | The developer might not consider that when a program in Windows operates with different permissions than the executing user, the use of links, mount points, and junctions might cause the program to access files or directories that are outside of the intended storage location. |

## Applicable platforms

**Operating systems:** Windows (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Files or Directories | Read arbitrary files by replacing a user-controlled folder with a mount point and additional hard links. |
| Integrity | Modify Files or Directories | Modify an arbitrary file by replacing the rollback files in installer directories, as they can have the installer execute those rollbacks. |
| Availability | Modify Files or Directories | Even if there is no control of contents, an arbitrary file delete or overwrite (when running as SYSTEM or admin) can be used for a permanent system denial-of-service, e.g. by deleting a startup configuration file that prevents the service from starting. |

## Potential mitigations

### Architecture and Design (Separation of Privilege)

When designing software that will have different rights than the executer, the software should check that files that it is interacting with are not improper hard links or mount points. One way to do this in Windows is to use the functionality embedded in the following command: "dir /al /s /b" or, in PowerShell, use LinkType as a filter. In addition, some software uses authentication via signing to ensure that the file is the correct one to use. Make checks atomic with the file action, otherwise a TOCTOU weakness (CWE-367) can be introduced.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2021-26426 | Privileged service allows attackers to delete unauthorized files using a directory junction, leading to arbitrary code execution as SYSTEM. |
| CVE-2020-0863 | By creating a mount point and hard links, an attacker can abuse a service to allow users arbitrary file read permissions. |
| CVE-2019-1161 | Chain: race condition (CWE-362) in anti-malware product allows deletion of files by creating a junction (CWE-1386) and using hard links during the time window in which a temporary file is created and deleted. |
| CVE-2014-0568 | Escape from sandbox for document reader by using a mountpoint \[REF-1264\] |

## Real CVEs with this weakness (sample of 12 of 20)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-56857 | Root.Mkdir(All) can follow junctions out of the root on Windows in os | critical | 9.8 | - | No | 2026-10-08 |
| CVE-2025-58074 | Privilege escalation during the installation of Norton Secure VPN via the Microsoft Store | high | 8.8 | - | No | 2026-05-04 |
| CVE-2024-7400 | Local privilege escalation in ESET products for Windows | high | 8.5 | - | No | 2024-09-27 |
| CVE-2022-42291 | - | high | 8.2 | - | No | 2023-02-07 |
| CVE-2023-5834 | Vagrant’s Windows Installer Allowed Directory Junction Write | high | 7.8 | - | No | 2023-10-27 |
| CVE-2024-20887 | - | high | 7.5 | - | No | 2024-06-04 |
| CVE-2023-28065 | - | high | 7.3 | - | No | 2023-06-23 |
| CVE-2023-32454 | - | high | 7.1 | - | No | 2024-02-06 |
| CVE-2023-40623 | Arbitrary File Delete via Directory Junction in SAP BusinessObjects Suite(installer) | high | 7.1 | - | No | 2023-09-12 |
| CVE-2023-28071 | - | high | 7.1 | - | No | 2023-06-23 |
| CVE-2023-23698 | - | high | 7.1 | - | No | 2023-02-10 |
| CVE-2024-36340 | - | medium | 6.6 | - | No | 2025-05-13 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-59](https://radicalnotion.ai/cwe/cwe-59) | Improper Link Resolution Before File Access |

## Frequently asked questions

### What is CWE-1386?

The product opens a file or directory, but it does not properly prevent the name from being associated with a junction or mount point to a destination that is outside of the intended control sphere.

### What CVEs are caused by CWE-1386?

20 recorded CVEs are attributed to CWE-1386, including CVE-2026-56857, CVE-2025-58074 and CVE-2024-7400.

### How do you prevent CWE-1386?

When designing software that will have different rights than the executer, the software should check that files that it is interacting with are not improper hard links or mount points. One way to do this in Windows is to use the functionality embedded in the following command: "dir /al /s /b" or, in PowerShell, use LinkType as a filter. In addition, some software uses authentication via signing to ensure that the file is the correct one to use. Make checks atomic with the file action, otherwise a TOCTOU weakness (CWE-367) can be introduced.

### What are the consequences of CWE-1386?

Exploiting CWE-1386 can lead to: Read Files or Directories, Modify Files or Directories.

### Is CWE-1386 actively exploited?

20 recorded CVEs are caused by CWE-1386; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/1386.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-1386). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
