---
title: "CWE-59: Improper Link Resolution Before File Access"
url: https://radicalnotion.ai/cwe/cwe-59
type: cwe
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."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-59: Improper Link Resolution Before File Access

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 1,736
- **Of those, in CISA KEV:** 22
- **New in 2026:** 475
- **CWE catalog version:** 4.21

## 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.

## Background

Soft links are a UNIX term that is synonymous with simple shortcuts on Windows-based platforms.

## 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).
- Link Following

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Operating systems:** Windows (Sometimes), Unix (Often)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Access Control | Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism | 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. |
| Other | Execute Unauthorized Code or Commands | 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

### Architecture and Design (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.

## Detection methods

### 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:

Cost effective for partial coverage:

- Formal Methods / Correct-By-Construction
- Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)

Effectiveness: High

## Observed examples

| CVE | 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 | Chain: File system allows local attackers to hide file usage activities via a hard link (CWE-65) to the target file, which causes the link to be recorded in the audit trail instead of the target file (CWE-221). |
| 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. |

## Real CVEs with this weakness (sample of 12 of 1,736)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-60710 | Host Process for Windows Tasks Elevation of Privilege Vulnerability | critical | 9.3 | - | Yes | 2025-11-11 |
| CVE-2019-1385 | Windows AppX Deployment Extensions Elevation of Privilege Vulnerability | critical | 9.3 | - | Yes | 2019-11-12 |
| CVE-2019-1315 | Windows Error Reporting Manager Elevation of Privilege Vulnerability | critical | 9.3 | - | Yes | 2019-10-10 |
| CVE-2022-30333 | RARLAB UnRAR Directory Traversal Vulnerability | high | 8.7 | - | Yes | 2022-05-09 |
| CVE-2020-36193 | Directory Traversal in Archive\_Tar | high | 8.7 | - | Yes | 2021-01-18 |
| CVE-2023-36874 | Windows Error Reporting Service Elevation of Privilege Vulnerability | high | 8.5 | - | Yes | 2023-07-11 |
| CVE-2020-0683 | Microsoft Windows Installer Privilege Escalation Vulnerability | high | 8.5 | - | Yes | 2020-02-11 |
| CVE-2020-0638 | Update Notification Manager Elevation of Privilege Vulnerability | high | 8.5 | - | Yes | 2020-01-14 |
| CVE-2019-1253 | Microsoft Windows AppX Deployment Server Privilege Escalation Vulnerability | high | 8.5 | - | Yes | 2019-09-11 |
| CVE-2019-1130 | Microsoft Windows AppX Deployment Service Privilege Escalation Vulnerability | high | 8.5 | - | Yes | 2019-07-29 |
| CVE-2019-1129 | Microsoft Windows AppX Deployment Service (AppXSVC) Privilege Escalation Vulnerability | high | 8.5 | - | Yes | 2019-07-29 |
| CVE-2019-1064 | Windows Elevation of Privilege Vulnerability | high | 8.5 | - | Yes | 2019-06-12 |

## Related attack patterns (CAPEC)

- [CAPEC-132](https://radicalnotion.ai/capec/capec-132): Symlink Attack
- [CAPEC-17](https://radicalnotion.ai/capec/capec-17): Using Malicious Files
- [CAPEC-35](https://radicalnotion.ai/capec/capec-35): Leverage Executable Code in Non-Executable Files
- [CAPEC-76](https://radicalnotion.ai/capec/capec-76): Manipulating Web Input to File System Calls

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-706](https://radicalnotion.ai/cwe/cwe-706) | Use of Incorrectly-Resolved Name or Reference |
| Child | [CWE-61](https://radicalnotion.ai/cwe/cwe-61) | UNIX Symbolic Link (Symlink) Following |
| Child | [CWE-62](https://radicalnotion.ai/cwe/cwe-62) | UNIX Hard Link |
| Child | [CWE-64](https://radicalnotion.ai/cwe/cwe-64) | Windows Shortcut Following (.LNK) |
| Child | [CWE-65](https://radicalnotion.ai/cwe/cwe-65) | Windows Hard Link |
| Child | [CWE-1386](https://radicalnotion.ai/cwe/cwe-1386) | Insecure Operation on Windows Junction / Mount Point |
| Related | [CWE-73](https://radicalnotion.ai/cwe/cwe-73) | External Control of File Name or Path |
| Related | [CWE-363](https://radicalnotion.ai/cwe/cwe-363) | Race Condition Enabling Link Following |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Link Following | - | - |
| CERT C Secure Coding | Canonicalize path names originating from untrusted sources | FIO02-C | - |
| CERT C Secure Coding | Check for the existence of links when dealing with files | POS01-C | - |
| SEI CERT Perl Coding Standard | Do not operate on files that can be modified by untrusted users | FIO01-PL | CWE More Specific |
| Software Fault Patterns | Link in resource name resolution | SFP18 | - |

## Frequently asked questions

### What is CWE-59?

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.

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

1,736 recorded CVEs are attributed to CWE-59, including CVE-2025-60710, CVE-2019-1385 and CVE-2019-1315. 22 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-59?

Follow the principle of least privilege when assigning access rights to entities in a software system.

### How is CWE-59 detected?

Automated Static Analysis - Binary or Bytecode: According to SOAR, the following detection techniques may be useful:

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

Exploiting CWE-59 can lead to: Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism, Execute Unauthorized Code or Commands.

### Is CWE-59 actively exploited?

Yes. 22 CWE-59 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 1,736 recorded CVEs.

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

---

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