SillyTavern Path Traversal Vulnerability
Overview
SillyTavern, a popular local UI for interacting with large language models and AI generation tools, suffers from a critical path traversal vulnerability. Versions prior to 1.17.0 are affected. The vulnerability resides within the static file route handler. Attackers can exploit this by crafting malicious requests that include percent-encoded directory traversal sequences, such as '%2E%2E%2F'. When these sequences are sent to static file routes, the application incorrectly resolves them, allowing an unauthenticated user to probe the server's filesystem. By observing the server's responses (e.g., error messages or file access indicators), an attacker can determine the existence of arbitrary files on the system. This could reveal sensitive system information, configuration files, or other potentially exploitable data, paving the way for further attacks or unauthorized access. The ease of exploitation and the potential for information disclosure make this a significant security concern for SillyTavern users.
Affected Systems
Testing Guide
1. Ensure SillyTavern is running and accessible. 2. Use a tool like `curl` or a web browser's developer console. 3. Send a GET request to a static file route, such as `/api/static/..%252E%252E%252F..%252E%252E%252Fetc/passwd` (replace with a known sensitive file path on your system). 4. Observe the response. If a file exists, you might get an error indicating file access or a partial file content. If the file does not exist, you will likely receive a different error (e.g., 404 Not Found). 5. Repeat with different, known-to-exist and known-to-not-exist file paths to confirm traversal capability.
Mitigation Steps
- Update SillyTavern to version 1.17.0 or later. - Implement strict input validation on all user-supplied path components. - Configure web server (if applicable) to restrict access to sensitive directories. - Regularly review application logs for suspicious access attempts to static file routes.
Patch Details
Version 1.17.0