CWE -

CWE-59: Improper Link Resolution Before File Access ('Link Following') (4.19.1)
Common Weakness Enumeration
A community-developed list of SW & HW weaknesses that can become vulnerabilities
CWE List

CWE-59: Improper Link Resolution Before File Access ('Link Following') (4.19.1)
Who We Are
User Stories
History
Documents
Videos
Basics
Root Cause Mapping   ►
Guidance
Quick Tips
Examples
How to Contribute Weakness Content
FAQs
Glossary
Top-N Lists   ►
Top 25 Software
Top Hardware
Top 10 KEV Weaknesses
CWE List   ►
Current Version
Reports
Visualizations
Releases Archive
Downloads
REST API
News   ►
Current News
Blog
Podcast
News Archive
CWE Board
Working Groups & Special Interest Groups
Email Lists
Search CWE List
Search Website
CWE Glossary Definition
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.
View customized information:
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.
Edit Custom Filter
Description
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.
Alternate Terms
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
).
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; 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.
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 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - a CWE entry that contains a set of other entries that share a common characteristic.
1019
Validate Inputs
Background Details
Soft links are a UNIX term that is synonymous with simple shortcuts on Windows-based platforms.
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
Note
Implementation
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
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.
Languages
Class: Not Language-Specific
(Undetermined Prevalence)
Operating Systems
Class: Windows
(Sometimes Prevalent)
Class: Unix
(Often Prevalent)
Technologies
Class: Not Technology-Specific
(Undetermined Prevalence)
Likelihood Of Exploit
Medium
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
CVE-1999-1386
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.
CVE-2000-1178
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.
CVE-2004-0217
Antivirus update allows local users to create or append to arbitrary files via a symlink attack on a logfile.
CVE-2003-0517
Symlink attack allows local users to overwrite files.
CVE-2004-0689
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.
CVE-2005-1879
Second-order symlink vulnerabilities
CVE-2005-1880
Second-order symlink vulnerabilities
CVE-2005-1916
Symlink in Python program
CVE-2000-0972
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.
CVE-2005-0824
Signal causes a dump that follows symlinks.
CVE-2001-1494
Hard link attack, file overwrite; interesting because program checks against soft links
CVE-2002-0793
Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.
CVE-2003-0578
Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.
CVE-1999-0783
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.
CVE-2004-1603
Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.
CVE-2004-1901
Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.
CVE-2005-1111
Hard link race condition
CVE-2000-0342
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."
CVE-2001-1042
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
CVE-2001-1043
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
CVE-2005-0587
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.
CVE-2001-1386
".LNK." - .LNK with trailing dot
CVE-2003-1233
Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link
CVE-2002-0725
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.
CVE-2003-0844
Web server plugin allows local users to overwrite arbitrary files via a symlink attack on predictable temporary filenames.
CVE-2015-3629
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.
CVE-2021-21272
"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.
CVE-2020-27833
"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)
Detection
Methods
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
Functional Areas
File Processing
Affected Resources
File or Directory
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
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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - a CWE entry that contains a set of other entries that share a common characteristic.
1404
Comprehensive Categorization: File Handling
MemberOf
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.
Notes
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.
Taxonomy
Mappings
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
Related Attack Patterns
CAPEC-ID
Attack Pattern Name
CAPEC-132
Symlink Attack
CAPEC-17
Using Malicious Files
CAPEC-35
Leverage Executable Code in Non-Executable Files
CAPEC-76
Manipulating Web Input to File System Calls
References
[REF-62]
Mark Dowd, John McDonald and Justin Schuh.
"The Art of Software Security Assessment".
Chapter 9, "Symbolic Link Attacks", Page 518. 1st Edition. Addison Wesley. 2006.
[REF-1282]
Snyk.
"Zip Slip Vulnerability".
2018-06-05.
>.
[REF-1479]
Gregory Larsen, E. Kenneth Hong Fong, David A. Wheeler and Rama S. Moorthy.
"State-of-the-Art Resources (SOAR) for Software Vulnerability Detection, Test, and Evaluation".
2014-07.
>.

URL validated: 2025-09-05
Content
History
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 Content Team
MITRE
updated Mapping_Notes
2023-04-27
CWE Content Team
MITRE
updated Relationships
2023-01-31
CWE Content Team
MITRE
updated Description
2022-10-13
CWE Content Team
MITRE
updated Alternate_Terms, Background_Details, Observed_Examples, References, Relationship_Notes, Theoretical_Notes
2022-06-28
CWE Content Team
MITRE
updated Relationships
2022-04-28
CWE Content Team
MITRE
updated Research_Gaps
2021-10-28
CWE Content Team
MITRE
updated Relationships
2021-03-15
CWE Content Team
MITRE
updated Relationships
2020-02-24
CWE Content Team
MITRE
updated Relationships
2019-06-20
CWE Content Team
MITRE
updated Relationships
2019-01-03
CWE Content Team
MITRE
updated Taxonomy_Mappings
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 Content Team
MITRE
updated Relationships
2014-07-30
CWE Content Team
MITRE
updated Detection_Factors, Relationships, Taxonomy_Mappings
2014-06-23
CWE Content Team
MITRE
updated Common_Consequences, Other_Notes
2012-10-30
CWE Content Team
MITRE
updated Potential_Mitigations
2012-05-11
CWE Content Team
MITRE
updated Common_Consequences, Observed_Examples, References, Relationships
2011-09-13
CWE Content Team
MITRE
updated Relationships, Taxonomy_Mappings
2011-06-01
CWE Content Team
MITRE
updated Common_Consequences
2010-04-05
CWE Content Team
MITRE
updated Related_Attack_Patterns
2010-02-16
CWE Content Team
MITRE
updated Potential_Mitigations, Relationships
2009-10-29
CWE Content Team
MITRE
updated Background_Details, Other_Notes
2009-05-27
CWE Content Team
MITRE
updated Description, Name
2009-01-12
CWE Content Team
MITRE
updated Relationships
2008-11-24
CWE Content Team
MITRE
updated Relationships, Taxonomy_Mappings
2008-09-08
CWE Content Team
MITRE
updated Alternate_Terms, Applicable_Platforms, Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings, Weakness_Ordinalities
2008-07-01
Eric Dalci
Cigital
updated Time_of_Introduction
Previous Entry Names
Change Date
Previous Entry Name
2008-04-11
Link Following
2009-05-27
Failure to Resolve Links Before File Access (aka 'Link Following')
More information is available — Please edit the custom filter or select a different filter.
Page Last Updated:
January 21, 2026
Manage Cookies
Cookie Notice
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the
. CWE is sponsored by the
U.S. Department of Homeland Security
(DHS)
Cybersecurity and Infrastructure Security Agency
(CISA) and managed by the
Homeland Security Systems Engineering and Development Institute
(HSSEDI) which is operated by
The MITRE Corporation
(MITRE). Copyright © 2006–2026, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.