CWEweakness
CWE-61 UNIX Symbolic Link (Symlink) Following
High
Official page ↗
- Alternate terms
- Symlink following, symlink vulnerability
- Abstraction
- Compound
- Structure
- Composite
- Status
- Incomplete
- Likelihood of exploit
- High
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.
Common consequences
• Confidentiality, Integrity: Read Files or Directories, Modify Files or Directories — A product that allows a symbolic link (symlink) as part of a path - whether in internal code or through user input - can allow an attacker to spoof the symbolic link and traverse the file system to unintended locations or access arbitrary files. An attacker could read, write, or /corrupt a file that they originally did not have permissions to access directly.
Potential mitigations
• [Implementation] Symbolic link attacks often occur when a program creates a tmp directory that stores files/links. Access to the directory should be restricted to the program as to prevent attackers from manipulating the files.
• [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: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, 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: Possible interesting example
• 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-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-2020-26277: In a MySQL database deployment tool, users may craft a maliciously packaged tarball that contains symlinks to files external to the target and once unpacked, will execute.
• 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.
Related
Attack pattern · CAPEC (1)
- CAPEC-27 Leveraging Race Conditions via Symbolic Links attack pattern
Observed example · CVE (13)
- CVE-2021-21272 ORAS is open source software which enables a way to push OCI Artifacts to OCI Conformant registries. vulnerability
- CVE-2020-26277 DBdeployer is a tool that deploys MySQL database servers easily. 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-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-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-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-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
Child of · CWE (1)
- CWE-59 Improper Link Resolution Before File Access weakness
Requires · CWE (4)
Referenced by CAPEC · weakness (1)
- CAPEC-27 Leveraging Race Conditions via Symbolic Links attack pattern
Referenced by CVE · weakness (191)
- CVE-2026-118688 wasmtime-wasi in Wasmtime before 36.0.18, 37.0.0 before 48.0.6, and 49.0.0 before 49.0.3 re-appends a trailing slash to rename source… vulnerability
- CVE-2026-115908 zip is a zip library for Rust that supports reading and writing simple ZIP files. vulnerability
- CVE-2026-115392 Wasmtime before 24.0.13, 25.0.0 before 36.0.14, 37.0.0 before 46.0.3, and 47.0.0 before 47.0.4 allows a filesystem sandbox escape in… vulnerability
- CVE-2026-115424 A flaw was found in the OpenShift client oc. vulnerability
- CVE-2026-102740 The AsyncHttpClient library allows Java applications to execute HTTP requests and asynchronously process HTTP responses. vulnerability
- CVE-2026-41541 An unix symbolic link (symlink) following vulnerability has been reported to affect Qsync Central. vulnerability
- CVE-2026-50612 An unix symbolic link (symlink) following vulnerability has been reported to affect QuMagie. vulnerability
- CVE-2026-108981 ngx_cache_purge before 3.0.4 can allow file deletion via a symlink attack in certain situations where nginx and a served application (e.g.,… vulnerability
- CVE-2026-107810 Nginx UI is a web user interface for the Nginx web server. vulnerability
- CVE-2026-103435 Claude Code validated that a target file path resided within the project working directory at permission-check time, but re-resolved the… vulnerability
- CVE-2026-106566 ImageMagick is free and open-source software used for editing and manipulating digital images. vulnerability
- CVE-2026-107174 A flaw was found in source-to-image. vulnerability
- CVE-2026-106507 Backstage is an open framework for building developer portals. vulnerability
- CVE-2026-105712 gpgtar in GnuPG before 2.5.19 can allow file overwrite via crafted data in an archive. vulnerability
- CVE-2026-97024 A path traversal vulnerability in Flatpak's handling of the files/etc directory during app deployment allows a malicious Flatpak app to… vulnerability
- CVE-2026-97023 A path traversal vulnerability in Flatpak's handling of the export/bin directory during app deployment allows a malicious Flatpak app to… vulnerability
- CVE-2026-96807 In Flatpak before 1.18.1, a malicious sandboxed app can replace ~/.var/app/$appid/.ld.so with a symlink, causing regenerate_ld_cache to… vulnerability
- CVE-2026-96808 In Flatpak before 1.18.1, the revokefs writer, used by the flatpak-system-helper to receive repository data from unprivileged callers,… vulnerability
- CVE-2026-91202 A flaw was found in cockpit-files. vulnerability
- CVE-2026-91099 HP has identified and remediated multiple externally reported vulnerabilities within HPLIP. vulnerability
- CVE-2026-90616 In Flatpak before 1.18.1, a malicious sandboxed app can obtain arbitrary read and write access to files on the host, which can be escalated… vulnerability
- CVE-2026-77159 A symlink-following flaw was found in libvirt's qemuTPMEmulatorPrepareHost() function. vulnerability
- CVE-2026-57825 In the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed because symlinks are mishandled during use of… vulnerability
- CVE-2026-79939 Dell PowerProtect Cyber Recovery, versions Prior to 20.3, contain an UNIX Symbolic Link (Symlink) Following vulnerability. vulnerability
- CVE-2026-75038 UNIX symbolic link (symlink) following vulnerability in ilya-zlobintsev/LACT allows for local denial-of-service. vulnerability
- CVE-2026-55168 Runtipi is a personal homeserver orchestrator. vulnerability
- CVE-2026-63125 Incus is a system container and virtual machine manager. vulnerability
- CVE-2026-64846 Nix is a package manager for Linux and other Unix systems. vulnerability
- CVE-2026-32657 Dell AppSync Version 4.6.0.0, Dell Metro Node Version 8.0.0, Dell UCC Edge Version 3.0.1, Dell VxRail Version 8.0.322, Dell PowerMax… vulnerability
- CVE-2026-47766 crun is an open source OCI Container Runtime fully written in C. vulnerability
Referenced by OWASP · mapped cwe (1)
- A01:2025 Broken Access Control Top 10 2025