CWE Glossary Definition |
👁 x
|
CWE-59: Improper Link Resolution Before File Access ('Link Following')
|
Weakness ID: 59
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.
|
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
|
insecure temporary file
|
Some people use the phrase "insecure temporary file" when referring to a link following weakness, but other weaknesses can produce insecure temporary files without any symlink involvement at all.
|
|
Zip Slip
|
"Zip slip" is an attack that uses file archives (e.g., ZIP, tar, rar, etc.) that contain filenames with path traversal sequences that cause the files to be written outside of the directory under which the archive is expected to be extracted [ REF-1282]. It is most commonly used for relative path traversal ( CWE-23) and link following ( CWE-59).
|
👁 Section Help 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; Modify Files or Directories; Bypass Protection Mechanism
|
Scope: Confidentiality, Integrity, Access Control
An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism then an attacker may be able to bypass the mechanism.
|
|
Execute Unauthorized Code or Commands
|
Scope: Other
Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since a ".LNK" file can be uploaded like a normal file. This can enable remote execution.
|
👁 +
Potential Mitigations
| Phase(s) |
Mitigation |
|
Architecture and Design
|
Strategy: Separation of Privilege
Follow the principle of least privilege when assigning access rights to entities in a software system.
Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
|
👁 Section Help
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 and CanAlsoBe are defined to show similar weaknesses that the user
may want to explore.
👁 +
Relevant to the view "Research Concepts" (View-1000)
| Nature |
Type |
ID |
Name |
| ChildOf |
👁 Class
Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource.
|
706
|
Use of Incorrectly-Resolved Name or Reference
|
| ParentOf |
👁 Composite
Composite - a Compound Element that consists of two or more distinct weaknesses, in which all weaknesses must be present at the same time in order for a potential vulnerability to arise. Removing any of the weaknesses eliminates or sharply reduces the risk. One weakness, X, can be "broken down" into component weaknesses Y and Z. There can be cases in which one weakness might not be essential to a composite, but changes the nature of the composite when it becomes a vulnerability.
|
61
|
UNIX Symbolic Link (Symlink) Following
|
| ParentOf |
👁 Variant
Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource.
|
62
|
UNIX Hard Link
|
| ParentOf |
👁 Variant
Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource.
|
64
|
Windows Shortcut Following (.LNK)
|
| ParentOf |
👁 Variant
Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource.
|
65
|
Windows Hard Link
|
| ParentOf |
👁 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.
|
1386
|
Insecure Operation on Windows Junction / Mount Point
|
| CanFollow |
👁 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.
|
73
|
External Control of File Name or Path
|
| CanFollow |
👁 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.
|
363
|
Race Condition Enabling Link Following
|
👁 +
Relevant to the view "Software Development" (View-699)
| Nature |
Type |
ID |
Name |
| MemberOf |
👁 Category
Category - a CWE entry that contains a set of other entries that share a common characteristic.
|
1219
|
File Handling Issues
|
👁 +
Relevant to the view "Weaknesses for Simplified Mapping of Published Vulnerabilities" (View-1003)
| Nature |
Type |
ID |
Name |
| ChildOf |
👁 Class
Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource.
|
706
|
Use of Incorrectly-Resolved Name or Reference
|
👁 +
Relevant to the view "Architectural Concepts" (View-1008)
| Nature |
Type |
ID |
Name |
| MemberOf |
👁 Category
Category - a CWE entry that contains a set of other entries that share a common characteristic.
|
1019
|
Validate Inputs
|
Soft links are a UNIX term that is synonymous with simple shortcuts on Windows-based platforms.
👁 +
Modes
Of Introduction
👁 Section Help 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 |
Note |
| Implementation |
REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
👁 +
Likelihood Of Exploit
👁 + 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 |
|
|
Some versions of Perl follow symbolic links when running with the -e option, which allows local users to overwrite arbitrary files via a symlink attack.
|
|
|
Text editor follows symbolic links when creating a rescue copy during an abnormal exit, which allows local users to overwrite the files of other users.
|
|
|
Antivirus update allows local users to create or append to arbitrary files via a symlink attack on a logfile.
|
|
|
Symlink attack allows local users to overwrite files.
|
|
|
Window manager does not properly handle when certain symbolic links point to "stale" locations, which could allow local users to create or truncate arbitrary files.
|
|
|
Second-order symlink vulnerabilities
|
|
|
Second-order symlink vulnerabilities
|
|
|
Symlink in Python program
|
|
|
Setuid product allows file reading by replacing a file being edited with a symlink to the targeted file, leaking the result in error messages when parsing fails.
|
|
|
Signal causes a dump that follows symlinks.
|
|
|
Hard link attack, file overwrite; interesting because program checks against soft links
|
|
|
Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.
|
|
|
Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.
|
|
|
Operating system allows local users to conduct a denial of service by creating a hard link from a device special file to a file on an NFS file system.
|
|
|
Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.
|
|
|
Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.
|
|
|
Hard link race condition
|
|
|
Mail client allows remote attackers to bypass the user warning for executable attachments such as .exe, .com, and .bat by using a .lnk file that refers to the attachment, aka "Stealth Attachment."
|
|
|
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
|
|
|
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
|
|
|
Browser allows remote malicious web sites to overwrite arbitrary files by tricking the user into downloading a .LNK (link) file twice, which overwrites the file that was referenced in the first .LNK file.
|
|
|
".LNK." - .LNK with trailing dot
|
|
|
Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link
|
|
|
File system allows local attackers to hide file usage activities via a hard link to the target file, which causes the link to be recorded in the audit trail instead of the target file.
|
|
|
Web server plugin allows local users to overwrite arbitrary files via a symlink attack on predictable temporary filenames.
|
|
|
A Libcontainer used in Docker Engine allows local users to escape containerization and write to an arbitrary file on the host system via a symlink attack in an image when respawning a container.
|
|
|
"Zip Slip" vulnerability in Go-based Open Container Initiative (OCI) registries product allows writing arbitrary files outside intended directory via symbolic links or hard links in a gzipped tarball.
|
|
|
"Zip Slip" vulnerability in container management product allows writing arbitrary files outside intended directory via a container image (.tar format) with filenames that are symbolic links that point to other files within the same tar file; however, the files being pointed to can also be symbolic links to destinations outside the intended directory, bypassing the initial check.
|
👁 +
Weakness Ordinalities
| Ordinality |
Description |
|
Resultant
|
(where the weakness is typically related to the presence of some other weaknesses)
|
| Method |
Details |
|
Automated Static Analysis - Binary or Bytecode
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
- Bytecode Weakness Analysis - including disassembler + source code weakness analysis
Effectiveness: SOAR Partial
|
|
Manual Static Analysis - Binary or Bytecode
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
- Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
|
|
Dynamic Analysis with Automated Results Interpretation
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
- Web Application Scanner
- Web Services Scanner
- Database Scanners
Effectiveness: SOAR Partial
|
|
Dynamic Analysis with Manual Results Interpretation
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
- Fuzz Tester
- Framework-based Fuzzer
Effectiveness: SOAR Partial
|
|
Manual Static Analysis - Source Code
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
- Focused Manual Spotcheck - Focused manual analysis of source
- Manual Source Code Review (not inspections)
Effectiveness: High
|
|
Automated Static Analysis - Source Code
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
- Source code Weakness Analyzer
- Context-configured Source Code Weakness Analyzer
Effectiveness: SOAR Partial
|
|
Architecture or Design Review
|
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
- Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
- Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
|
👁 Section Help 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 |
👁 View View - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). |
635
|
Weaknesses Originally Used by NVD from 2008 to 2016
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
743
|
CERT C Secure Coding Standard (2008) Chapter 10 - Input Output (FIO)
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
748
|
CERT C Secure Coding Standard (2008) Appendix - POSIX (POS)
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
808
|
2010 Top 25 - Weaknesses On the Cusp
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
877
|
CERT C++ Secure Coding Section 09 - Input Output (FIO)
|
| MemberOf |
👁 View View - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). |
884
|
CWE Cross-section
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
980
|
SFP Secondary Cluster: Link in Resource Name Resolution
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
1185
|
SEI CERT Perl Coding Standard - Guidelines 07. File Input and Output (FIO)
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
1345
|
OWASP Top Ten 2021 Category A01:2021 - Broken Access Control
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
1404
|
Comprehensive Categorization: File Handling
|
| MemberOf |
👁 Category Category - a CWE entry that contains a set of other entries that share a common characteristic. |
1436
|
OWASP Top Ten 2025 Category A01:2025 - Broken Access Control
|
👁 +
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.
|
Theoretical
Link following vulnerabilities are Multi-factor Vulnerabilities (MFV). They are the combination of multiple elements: file or directory permissions, filename predictability, race conditions, and in some cases, a design limitation in which there is no mechanism for performing atomic file creation operations.
Some potential factors are race conditions, permissions, and predictability.
| Mapped Taxonomy Name |
Node ID |
Fit |
Mapped Node Name |
| PLOVER |
Link Following |
| CERT C Secure Coding |
FIO02-C |
Canonicalize path names originating from untrusted sources |
| CERT C Secure Coding |
POS01-C |
Check for the existence of links when dealing with files |
| SEI CERT Perl Coding Standard |
FIO01-PL |
CWE More Specific |
Do not operate on files that can be modified by untrusted users |
| Software Fault Patterns |
SFP18 |
Link in resource name resolution |
👁 + Submissions |
| Submission Date |
Submitter |
Organization |
2006-07-19
(CWE Draft 3, 2006-07-19)
|
PLOVER |
👁 + Modifications |
| Modification Date |
Modifier |
Organization |
2025-12-11
(CWE 4.19, 2025-12-11)
|
CWE Content Team |
MITRE |
|
updated Applicable_Platforms, Relationships
|
2025-09-09
(CWE 4.18, 2025-09-09)
|
CWE Content Team |
MITRE |
|
updated Detection_Factors, References
|
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
|
2022-10-13
(CWE 4.9, 2022-10-13)
|
CWE Content Team |
MITRE |
|
updated Alternate_Terms, Background_Details, Observed_Examples, References, Relationship_Notes, Theoretical_Notes
|
2022-06-28
(CWE 4.8, 2022-06-28)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2022-04-28
(CWE 4.7, 2022-04-28)
|
CWE Content Team |
MITRE |
|
updated Research_Gaps
|
2021-10-28
(CWE 4.6, 2021-10-28)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2021-03-15
(CWE 4.4, 2021-03-15)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2020-02-24
(CWE 4.0, 2020-02-24)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2019-06-20
(CWE 3.3, 2019-06-20)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2019-01-03
(CWE 3.2, 2019-01-03)
|
CWE Content Team |
MITRE |
|
updated Taxonomy_Mappings
|
2017-11-08
(CWE 3.0, 2017-11-08)
|
CWE Content Team |
MITRE |
|
updated Affected_Resources, Applicable_Platforms, Causal_Nature, Common_Consequences, Functional_Areas, Likelihood_of_Exploit, Modes_of_Introduction, Relationships, Taxonomy_Mappings
|
2015-12-07
(CWE 2.9, 2015-12-07)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2014-07-30
(CWE 2.8, 2014-07-31)
|
CWE Content Team |
MITRE |
|
updated Detection_Factors, Relationships, Taxonomy_Mappings
|
2014-06-23
(CWE 2.7, 2014-06-23)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences, Other_Notes
|
2012-10-30
(CWE 2.3, 2012-10-30)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2012-05-11
(CWE 2.2, 2012-05-15)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences, Observed_Examples, References, Relationships
|
2011-09-13
(CWE 2.1, 2011-09-13)
|
CWE Content Team |
MITRE |
|
updated Relationships, Taxonomy_Mappings
|
2011-06-01
(CWE 1.13, 2011-06-01)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences
|
2010-04-05
(CWE 1.8.1, 2010-04-05)
|
CWE Content Team |
MITRE |
|
updated Related_Attack_Patterns
|
2010-02-16
(CWE 1.8, 2010-02-16)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations, Relationships
|
2009-10-29
(CWE 1.6, 2009-10-29)
|
CWE Content Team |
MITRE |
|
updated Background_Details, Other_Notes
|
2009-05-27
(CWE 1.4, 2009-05-27)
|
CWE Content Team |
MITRE |
|
updated Description, Name
|
2009-01-12
(CWE 1.2, 2009-01-12)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2008-11-24
(CWE 1.1, 2008-11-25)
|
CWE Content Team |
MITRE |
|
updated Relationships, Taxonomy_Mappings
|
2008-09-08
(CWE 1.0, 2008-09-09)
|
CWE Content Team |
MITRE |
|
updated Alternate_Terms, Applicable_Platforms, Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings, Weakness_Ordinalities
|
2008-07-01
(CWE 1.0, 2008-09-09)
|
Eric Dalci |
Cigital |
|
updated Time_of_Introduction
|
👁 + Previous Entry Names |
| Change Date |
Previous Entry Name |
| 2009-05-27
|
Failure to Resolve Links Before File Access (aka 'Link Following') |
| 2008-04-11
|
Link Following |
More information is available — Please edit the custom filter or select a different filter.
|