This vulnerability occurs when an application uses a filename to access a file but fails to properly check if that name points to a symbolic link, shortcut, or junction. This allows an attacker to manipulate the link's target, causing the application to read or write to an unintended, potentially sensitive location.
At its core, this is a path traversal issue enabled by symbolic links. When a program doesn't verify that a file is a regular file and not a link, an attacker can create a link that points outside the intended directory—like a system file or another user's data. The application then blindly follows this link, leading to unauthorized access, data corruption, or a denial of service. To prevent this, developers must explicitly resolve symbolic links before performing file operations. This involves using system calls or functions that return the canonical path of a file, checking the file's type, and implementing proper access controls. Always assume filenames provided by users or external sources are untrusted and validate the final resolved path against a safe allowlist.
Impact: Read Files or DirectoriesModify Files or DirectoriesBypass 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.
Impact: 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.
Strategy: Separation of Privilege
Medium