CWE-1386: Insecure Operation on Windows Junction / Mount Point
|
Weakness ID: 1386
Vulnerability Mapping:
ALLOWED
This CWE ID may be used to map to real-world vulnerabilities
Abstraction:
Base
Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource.
|
View customized information:
Shows the description and diagram, platforms, mitigations, consequences, relationships, memberships, and content history.
For users who are interested in more notional aspects of a weakness. Example: educators, technical writers, and project/program managers.
For users who are concerned with the practical application and details about the nature of a weakness and how to prevent it from happening. Example: tool developers, security researchers, pen-testers, incident response analysts.
For users who are mapping an issue to CWE/CAPEC IDs, i.e., finding the most appropriate CWE for a specific issue (e.g., a CVE record). Example: tool developers, security researchers.
For users who wish to see all available information for the CWE/CAPEC entry.
For users who want to customize what details are displayed.
More information is available — Please edit the custom filter or select a different filter.
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.
Extended Description
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.
Common Consequences
This table specifies different individual consequences
associated with the weakness. The Scope identifies the application security area that is
violated, while the Impact describes the negative technical impact that arises if an
adversary succeeds in exploiting this weakness. The Likelihood provides information about
how likely the specific consequence is expected to be seen relative to the other
consequences in the list. For example, there may be high likelihood that a weakness will be
exploited to achieve a certain impact, but a low likelihood that it will be exploited to
achieve a different impact.
| Impact |
Details |
|
Read Files or Directories
|
Scope: Confidentiality
Read arbitrary files by replacing a user-controlled folder with a mount point and additional hard links.
|
|
Modify Files or Directories
|
Scope: Integrity
Modify an arbitrary file by replacing the rollback files in installer directories, as they can have the installer execute those rollbacks.
|
|
Modify Files or Directories
|
Scope: Availability
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
| Phase(s) |
Mitigation |
|
Architecture and Design
|
Strategy: 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.
|
Relationships
This table shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition,
relationships such as PeerOf, Overlaps, and CanAlsoBe are defined to show similar weaknesses that the user
may want to explore.
|
Relevant to the view "Complete Weakness Hierarchy" (View-1000)
|
|
Nature |
Type |
ID |
Name |
|
ChildOf |
Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource.
|
59
|
Improper Link Resolution Before File Access
|
|
Background Details
| 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
The different Modes of Introduction provide information
about how and when this
weakness may be introduced. The Phase identifies a point in the life cycle at which
introduction
may occur, while the Note provides a typical scenario related to introduction during the
given
phase.
| Phase(s) |
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
This listing shows possible areas for which the given
weakness could appear. These
may be for specific named Languages, Operating Systems, Architectures, Paradigms,
Technologies,
or a class of such platforms. The platform is listed along with how frequently the given
weakness appears for that instance.
| Type |
Applicable Platforms |
Notes |
| Languages |
Class: Not Language-Specific
(Undetermined Prevalence)
|
|
| Operating Systems |
Class: Windows
(Undetermined Prevalence)
|
|
Selected Observed
Examples
Note: this is a curated list of examples for users to understand the variety of ways in which this
weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference |
Description |
|
|
Privileged service allows attackers to delete unauthorized files using a directory junction, leading to arbitrary code execution as SYSTEM.
|
|
|
By creating a mount point and hard links, an attacker can abuse a service to allow users arbitrary file read permissions.
|
|
|
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.
|
|
|
Escape from sandbox for document reader by using a mountpoint [ REF-1264]
|
Weakness Ordinalities
| Ordinality |
Description |
|
Primary
|
(where the weakness exists independent of other weaknesses)
|
|
Resultant
|
(where the weakness is typically related to the presence of some other weaknesses)
|
Memberships
This MemberOf Relationships table shows additional CWE Categories and Views that
reference this weakness as a member. This information is often useful in understanding where a
weakness fits within the context of external information sources.
| Nature |
Type |
ID |
Name |
| MemberOf |
Grouping - a CWE entry that contains a set of other entries that share a common characteristic. |
1416
|
Comprehensive Categorization: Resource Lifecycle Management
|
Vulnerability Mapping Notes
|
Usage
|
ALLOWED
(this CWE ID may be used to map to real-world vulnerabilities)
|
| Reason |
Acceptable-Use
|
|
Rationale
|
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
|
|
Comments
|
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
|
Notes
Terminology
Symbolic links, hard links, junctions, and mount points can be confusing terminology, as there are differences in how they operate between UNIX-based systems and Windows, and there are interactions between them.
Maintenance
This entry is still under development and will continue to see updates and content improvements.
Content
History
| Submissions |
| Submission Date |
Submitter |
Organization |
2022-06-07
(CWE 4.8, 2022-06-28)
|
CWE Content Team |
MITRE |
|
|
| Modifications |
| Modification Date |
Modifier |
Organization |
2026-10-28
(CWE 5.0, 2026-10-28)
|
CWE Content Team |
MITRE |
|
updated Background_Details, Description, References
|
2026-04-30
(CWE 4.20, 2026-04-30)
|
CWE Content Team |
MITRE |
|
updated Description
|
2025-12-11
(CWE 4.19, 2025-12-11)
|
CWE Content Team |
MITRE |
|
updated Weakness_Ordinalities
|
2023-06-29
(CWE 4.12, 2023-06-29)
|
CWE Content Team |
MITRE |
|
updated Mapping_Notes
|
2023-04-27
(CWE 4.11, 2023-04-27)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2023-01-31
(CWE 4.10, 2023-01-31)
|
CWE Content Team |
MITRE |
|
updated Description, Potential_Mitigations
|
More information is available — Please edit the custom filter or select a different filter.
|