Skip to content

Reading list

Learn Path traversal from real reports

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

12 reports, easiest first.

  1. GHSL-2023-192_GHSL-2023-194: Several vulnerabilities in bazarr - CVE-2023-50264, CVE-2023-50265, CVE-2023-50266

    GitHub Security Lab Beginner

    Bazarr had two endpoints that took a user-supplied filename and passed it to send_file without validation, allowing unauthenticated arbitrary file reads. A third endpoint took a user-supplied protocol and URL and made a server-side request, allowing blind SSRF to internal and external resources.

    Bazarr is a subtitle tool that runs a small web server. Two of its web addresses accepted a file path from the visitor and used it directly to fetch a file, so someone could ask for files outside the intended folder, such as the system password file. Another address let a visitor make the server fetch any web address, which could be used to probe internal systems.

  2. Arris / Arris-variant DSL/Fiber router critical vulnerability exposure

    ARRIS Beginner

    The muhttpd web server used in Arris and Arris-variant routers has a path traversal flaw that lets an unauthenticated attacker read any regular file on the device, including the configuration database with WiFi and management credentials. An attacker could use this to take over the router and the local network.

    A web server on these routers mishandles the file path in a request, so adding one extra character at the start lets someone ask for files outside the web folder, such as the router's password database. Because no login is needed, anyone who can reach the router's web port can read those files and then log in or reconfigure the device.

    The lesson. The server opens the requested file using a pointer that skips the first character of the path, and it does not confine paths to the web root before opening them.

  3. GHSL-2023-054: Unauthenticated arbitrary file read in Jenkins plugin 3.0.12 - CVE-2023-35147

    GitHub Security Lab Beginner

    The AWS CodeCommit Trigger Jenkins Plugin does not restrict a file name path parameter in an HTTP endpoint, allowing authenticated attackers to read arbitrary files on the Jenkins controller file system. An attacker can use path traversal sequences to access sensitive files such as credentials.xml or /etc/passwd.

    This plugin has a web address that takes a file name from the URL and uses it to open a file on the server. Because it does not check for '..' sequences, which mean 'go up a folder', an attacker can request files outside the intended folder. They need to be logged in to Jenkins and have a job set up with this plugin's trigger.

    The lesson. The plugin takes the file name directly from the request path and appends it to a directory path without validating or sanitising it, allowing path traversal.

  4. Finding and fixing an arbitrary file-read vulnerability in GitIngest (**CVE-2024–56074)**

    Beginner

    GitIngest followed symbolic links in submitted GitHub repositories without checking whether they pointed outside the cloned directory, so an attacker could read arbitrary files from the server. By submitting a repository containing a symlink to a sensitive file or directory, the attacker received its contents as text.

    A symbolic link (symlink) is like a shortcut that points to another file or folder. GitIngest copied files from GitHub repositories but did not check where these shortcuts led, so a shortcut pointing to a private file on the server let the attacker read that file. The fix makes the tool skip any shortcut that leads outside the repository.

    The lesson. The application did not validate symbolic links, allowing them to point outside the cloned repository and expose arbitrary files.

  5. Authenticated Arbitrary File Download (Path Traversal)

    PaperCut Beginner

    An authenticated user could manipulate the asset path parameter in a static content servlet to traverse directories and download arbitrary files from the server filesystem. This allowed reading of sensitive files such as API keys and system files like /etc/passwd.

    The application lets logged-in users fetch static files like images or fonts. The part of the web address that says which file to fetch was not checked properly, so by adding special characters like '..' a user could climb out of the intended folder and read any file on the server. This means someone with a basic account could steal secret keys or system files.

    The lesson. The application concatenated user-controlled input directly into a file path without sanitising it, allowing directory traversal.

  6. [crud-file-server] Path Traversal allows to read arbitrary file from the server

    Node.js third-party modules Beginner

    The crud-file-server module contains a path traversal vulnerability because its URL cleaning function uses an incorrect condition that never removes '..' sequences. An attacker can read arbitrary files on the server, such as /etc/passwd.

    The server is supposed to block requests that try to climb out of the shared folder using '..' in the URL. A coding mistake means that check never actually runs, so an attacker can ask for files outside the folder, like system password files.

    The lesson. The condition checking for '..' uses url.indexOf('..').length, which is always false because indexOf returns a number without a length property, so the removal code never executes.

  7. Lansweeper lansweeper TicketTemplateActions.aspx GetTemplateAttachment directory traversal vulnerability

    Cisco Talos Beginner

    A directory traversal vulnerability in the GetTemplateAttachment function of Lansweeper allows an authenticated attacker to read arbitrary files on the server by manipulating the fileuid parameter. An attacker could read sensitive files such as web.config, potentially leading to further compromise.

    This bug lets someone who can log in to the helpdesk trick the server into reading files it shouldn't. By putting special characters in a request, they can escape the intended folder and access any file on the machine, like configuration files that contain passwords.

  8. WWBN AVideo image404Raw.php information disclosure vulnerability

    Cisco Talos Beginner

    The image404Raw.php script in AVideo takes an attacker-controlled image parameter and uses it to read and serve any file on the server. An attacker can read sensitive files such as videos/configuration.php, which contains the salt used for encryption, potentially leading to administrator privileges.

    A web page that shows a placeholder image when a file is not found takes a filename from the user and reads that file from the server without checking if it is allowed. This means an attacker can ask for any file on the server, like a configuration file with secret keys, and see its contents. That secret can then be used to take over the site.

  9. [mcstatic] Path Traversal allows to read content of arbitrary files

    Node.js third-party modules Beginner

    The mcstatic module fails to sanitise file paths, allowing an attacker to read arbitrary files on the server. By sending a request with directory traversal sequences, an attacker can access files outside the intended directory.

    A file server is supposed to only serve files from a specific folder. Here, it doesn't check that the requested file is actually inside that folder. An attacker can use '../' to go up folders and read any file on the computer, like system files.

  10. GHSL-2021-1053: Path traversal in Grafana REST API - CVE-2021-43813, CVE-2021-43815

    GitHub Security Lab Beginner

    The Grafana REST API endpoint for retrieving plugin markdown files did not properly sanitise the user-supplied name parameter, allowing path traversal. An authenticated low-privileged user could read arbitrary .md files on the server.

    A path traversal bug lets someone use '..' in a file path to escape the intended folder and read other files. In this case, a logged-in user with minimal permissions could trick Grafana into reading any markdown file on the server, not just plugin documentation.

    The lesson. The application joined user-controlled input directly into a file path without validating that the resulting path stayed within the intended plugin directory.

  11. Veertu Anka Build registry archive files directory traversal vulnerability

    Cisco Talos Beginner

    A directory traversal vulnerability in the archive functionality of Veertu Anka Build 1.42.0 allows an unauthenticated attacker to download arbitrary directories from the system by manipulating the 'service' parameter. This can lead to disclosure of sensitive information.

    This bug lets someone trick the server into giving them files from outside the intended folder. By sending a special request, an attacker can read any directory on the machine, which might contain private data.

    The lesson. The application appends user-supplied input to a directory path without validating for directory traversal sequences, allowing access to arbitrary directories.

  12. Veertu Anka Build registry log files directory traversal vulnerability

    Cisco Talos Beginner

    A directory traversal vulnerability in the log download functionality of Veertu Anka Build 1.42.0 allows an unauthenticated attacker to read arbitrary log files on the system. By sending a crafted HTTP request with a manipulated 'service' parameter, an attacker can access sensitive information.

    This bug lets someone trick the server into reading files outside the intended log folder. By putting special characters like '../' in a web request, they can make the server show files it shouldn't, like system logs. No login is needed, so anyone who can reach the server can exploit it.

    The lesson. The 'service' parameter is appended to the log directory path without validating for directory traversal sequences, allowing an attacker to specify arbitrary paths.