CWEweakness

CWE-59 Improper Link Resolution Before File Access

Medium Official page ↗
Alternate terms
insecure temporary file, Zip Slip, Link Following
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
Medium
Languages
Not Language-Specific
CWE version
5.0

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.

Common consequences

• 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] 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 • 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 • 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 • 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 • 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) • 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 • 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.)

Observed examples

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

Related

Attack pattern · CAPEC (4)

  • CAPEC-132 Symlink Attack attack pattern
  • CAPEC-17 Using Malicious Files attack pattern
  • CAPEC-35 Leverage Executable Code in Non-Executable Files attack pattern
  • CAPEC-76 Manipulating Web Input to File System Calls attack pattern

Observed example · CVE (28)

  • CVE-2020-27833 A Zip Slip vulnerability was found in the oc binary in openshift-clients where an arbitrary file write is achieved by using a specially… vulnerability
  • CVE-2021-21272 ORAS is open source software which enables a way to push OCI Artifacts to OCI Conformant registries. vulnerability
  • CVE-2015-3629 Libcontainer 1.6.0, as used in Docker Engine, allows local users to escape containerization ("mount namespace breakout") and write to… vulnerability
  • CVE-2005-1916 linki.py in ekg 2005-06-05 and earlier allows local users to overwrite or create arbitrary files via a symlink attack on temporary files. vulnerability
  • CVE-2005-1879 LutelWall 0.97 and earlier allows local users to overwrite arbitrary files via a symlink attack on a temporary file created by a system… vulnerability
  • CVE-2005-1880 everybuddy 0.4.3 and earlier allows local users to overwrite arbitrary files via a symlink attack on a temporary file created by a system… vulnerability
  • CVE-2005-0824 The internal_dump function in Mathopd before 1.5p5, and 1.6x before 1.6b6 BETA, when Mathopd is running with the -n option, allows local… vulnerability
  • CVE-2005-1111 Race condition in cpio 2.6 and earlier allows local users to modify permissions of arbitrary files via a hard link attack on a file while… vulnerability
  • CVE-2005-0587 Firefox before 1.0.1 and Mozilla before 1.7.6 allows remote malicious web sites to overwrite arbitrary files by tricking the user into… vulnerability
  • CVE-2004-1901 Portage before 2.0.50-r3 allows local users to overwrite arbitrary files via a hard link attack on the lockfiles. vulnerability
  • CVE-2004-1603 cPanel 9.4.1-RELEASE-64 follows hard links, which allows local users to (1) read arbitrary files via the backup feature or (2) chown… vulnerability
  • CVE-2004-0689 KDE before 3.3.0 does not properly handle when certain symbolic links point to "stale" locations, which could allow local users to create… vulnerability
  • CVE-2004-0217 The LiveUpdate capability (liveupdate.sh) in Symantec AntiVirus Scan Engine 4.0 and 4.3 for Red Hat Linux allows local users to create or… vulnerability
  • CVE-2003-1233 Pedestal Software Integrity Protection Driver (IPD) 1.3 and earlier allows privileged attackers, such as rootkits, to bypass file access… vulnerability
  • CVE-2003-0844 mod_gzip 1.3.26.1a and earlier, and possibly later official versions, when running in debug mode without the Apache log, allows local users… vulnerability
  • CVE-2003-0517 faxrunqd.in in mgetty 1.1.28 and earlier allows local users to overwrite files via a symlink attack on JOB files. vulnerability
  • CVE-2003-0578 cci_dir in IBM U2 UniVerse 10.0.0.9 and earlier creates hard links and unlinks files as root, which allows local users to gain privileges… vulnerability
  • CVE-2002-0725 NTFS file system in Windows NT 4.0 and Windows 2000 SP2 allows local attackers to hide file usage activities via a hard link to the target… vulnerability
  • CVE-2002-0793 Hard link and possibly symbolic link following vulnerabilities in QNX RTOS 4.25 (aka QNX4) allow local users to overwrite arbitrary files… vulnerability
  • CVE-2001-1494 script command in the util-linux package before 2.11n allows local users to overwrite arbitrary files by setting a hardlink from the… vulnerability
  • CVE-2001-1042 Transsoft Broker 5.9.5.0 allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the… vulnerability
  • CVE-2001-1043 ArGoSoft FTP Server 1.2.2.2 allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to… vulnerability
  • CVE-2001-1386 WFTPD 3.00 allows remote attackers to read arbitrary files by uploading a (link) file that ends in a ".lnk." extension, which bypasses… vulnerability
  • CVE-2000-1178 Joe text editor follows symbolic links when creating a rescue copy called DEADJOE during an abnormal exit, which allows local users to… vulnerability
  • CVE-2000-0972 HP-UX 11.00 crontab allows local users to read arbitrary files via the -e option by creating a symlink to the target file during the… vulnerability
  • CVE-2000-0342 Eudora 4.x allows remote attackers to bypass the user warning for executable attachments such as .exe, .com, and .bat by using a .lnk file… vulnerability
  • CVE-1999-1386 Perl 5.004_04 and earlier follows symbolic links when running with the -e option, which allows local users to overwrite arbitrary files via… vulnerability
  • CVE-1999-0783 FreeBSD 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… vulnerability

Child of · CWE (1)

  • CWE-706 Use of Incorrectly-Resolved Name or Reference weakness

Referenced by CAPEC · weakness (4)

  • CAPEC-132 Symlink Attack attack pattern
  • CAPEC-17 Using Malicious Files attack pattern
  • CAPEC-35 Leverage Executable Code in Non-Executable Files attack pattern
  • CAPEC-76 Manipulating Web Input to File System Calls attack pattern

Referenced by CVE · weakness (1,859)

  • CVE-2026-115708 Improper Link Resolution Before File Access ('Link Following') (CWE-59) in Elastic Cloud Enterprise (ECE) can lead to authentication bypass… vulnerability
  • CVE-2026-115709 Improper Link Resolution Before File Access ('Link Following') (CWE-59) in Elastic Cloud Enterprise (ECE) can lead to unauthorized… vulnerability
  • CVE-2026-115713 Improper Link Resolution Before File Access ('Link Following') (CWE-59) in Elastic Cloud Enterprise (ECE) can lead to unauthorized read and… vulnerability
  • CVE-2026-103401 An Improper Link Resolution Before File Access ('Link Following') vulnerability in the unauthenticated web server handlers in Juniper… vulnerability
  • CVE-2026-116271 MIME::Parser::FileUnder versions before 5.521 for Perl reuse a pre-created output directory and follow symlinks in it, letting local users… vulnerability
  • CVE-2026-6064 Link following vulnerability in Data Shredder components in Norton Antivirus, Avast Antivirus, and AVG Internet Security prior to… vulnerability
  • CVE-2026-108304 Tanium addressed a local privilege escalation vulnerability in End-User Notifications. vulnerability
  • CVE-2026-108305 Tanium addressed a local privilege escalation vulnerability in End-User Notifications. vulnerability
  • CVE-2026-108306 Tanium addressed a local privilege escalation vulnerability in End-User Notifications. vulnerability
  • CVE-2026-108332 Tanium addressed an improper link resolution before file access vulnerability in Threat Response Client Extension. vulnerability
  • CVE-2026-116673 systeminformation is a System and OS information library for node.js. vulnerability
  • CVE-2026-116682 FileBrowser Quantum is a free, self-hosted, web-based file manager. vulnerability
  • CVE-2026-90464 An external control of file path vulnerability in a WatchGuard Fireware OS firewall diagnostic command allows a remote, authenticated… vulnerability
  • CVE-2026-93864 A link following vulnerability in WatchGuard Fireware OS’s firewall daemon allows a local attacker with code execution as a low-privileged… vulnerability
  • CVE-2026-112344 Syncplify Server! vulnerability
  • CVE-2026-115908 zip is a zip library for Rust that supports reading and writing simple ZIP files. vulnerability
  • CVE-2026-116213 Webasyst Framework through 4.4.0 contains an arbitrary file read vulnerability in waArchiveTar::writeItem() that creates symlinks from… vulnerability
  • CVE-2026-76654 An NTLM coercion vulnerability exists on Windows nodes when the subPath supplied in a pod's volumeMounts is set to a symbolic link that… vulnerability
  • CVE-2026-115569 Fallow is a codebase intelligence tool for TypeScript and JavaScript. vulnerability
  • CVE-2026-104068 JetBackup plugin for WordPress before 3.1.24.10 contains a symlink-based arbitrary file write vulnerability that allows an authenticated… vulnerability
  • CVE-2026-110063 Improper link resolution before file access ('link following') in VM Inspector for Azure Virtual Machines allows an unauthorized attacker… vulnerability
  • CVE-2026-114665 Goploy 1.18.0 before 1.18.1 contains a link following vulnerability in the /deploy/fileDiff and /deploy/fileCompare endpoints that allows… vulnerability
  • CVE-2026-115377 Incus before 6.0.7, 6.1.0 before 7.0.2, and 7.1.0 before 7.5.0 contains an arbitrary file write vulnerability that allows malicious… vulnerability
  • CVE-2026-115378 Incus before 6.0.7, 6.1.0 before 7.0.2, and 7.1.0 before 7.5.0 contains an arbitrary file write vulnerability in sftpRecursivePullFile that… vulnerability
  • CVE-2026-114096 Dulwich from 0.24.0 before 1.2.8 contains a symlink following vulnerability in porcelain.checkout(paths=[...]) that allows attackers to… vulnerability
  • CVE-2026-114462 Improper link resolution before file access ('link following') vulnerability in Velneo vServer. vulnerability
  • CVE-2026-76496 As part of Cisco's ongoing commitment to proactive security and product quality, the Cisco Expressway Series software engineering team has… vulnerability
  • CVE-2026-112912 filelock is a platform-independent file lock for Python. vulnerability
  • CVE-2026-112914 filelock is a platform-independent file lock for Python. vulnerability
  • CVE-2026-112936 filelock is a platform-independent file lock for Python. vulnerability
Show all 1,859 ›

Referenced by CWE · can precede (2)

  • CWE-363 Race Condition Enabling Link Following weakness
  • CWE-73 External Control of File Name or Path weakness

Referenced by CWE · child of (5)

  • CWE-1386 Insecure Operation on Windows Junction / Mount Point weakness
  • CWE-61 UNIX Symbolic Link (Symlink) Following weakness
  • CWE-62 UNIX Hard Link weakness
  • CWE-64 Windows Shortcut Following (.LNK) weakness
  • CWE-65 Windows Hard Link weakness

Referenced by CWE · has member (2)

  • CWE-635 Weaknesses Originally Used by NVD from 2008 to 2016 view
  • CWE-884 CWE Cross-section view

Referenced by OWASP · mapped cwe (2)

  • A01:2025 Broken Access Control Top 10 2025
  • A01:2021 Broken Access Control Top 10 2021