SillyTavern Path Traversal Vulnerability in Chat Endpoints
A path traversal vulnerability in SillyTavern versions 1.16.0 and earlier allows an authenticated attacker to read and delete arbitrary files under their user data root by manipulating the avatar_url parameter in the `/api/chats/export` and `/api/chats/delete` endpoints.
SillyTavern, a local web UI for large language models, is vulnerable to a path traversal attack. This vulnerability, affecting versions 1.16.0 and earlier, stems from insufficient input validation in the avatar_url parameter of the /api/chats/export and /api/chats/delete endpoints. An authenticated attacker can exploit this flaw to read or delete arbitrary files within the user’s data directory. The vulnerability exists because the application fails to adequately sanitize path traversal sequences like .. when constructing file paths. This can lead to the exposure of sensitive information such as secrets.json and settings.json, or the deletion of crucial user data, particularly in multi-user or remotely-accessible deployments. The vulnerability was patched in version 1.17.0 and assigned CVE-2026-34524.
Attack Chain
- The attacker authenticates to the SillyTavern application using valid credentials, obtaining a session cookie and CSRF token.
- The attacker crafts a malicious HTTP request targeting the
/api/chats/exportor/api/chats/deleteendpoint. - The attacker sets the
avatar_urlparameter in the request body to a path traversal sequence, such as.., to navigate outside the intended “chats” directory. - In the
/api/chats/exportendpoint, the attacker specifies thefileparameter to point to the desired file to read, such assecrets.json. - The server-side application uses
path.jointo concatenate the user’s chats directory with the attacker-controlledavatar_urlandfileparameters, resulting in path traversal. - The application reads the contents of the file specified by the attacker.
- In the
/api/chats/deleteendpoint, the attacker specifies thechatfileparameter to point to the desired file to delete, such assettings.json. - The application deletes the file specified by the attacker.
Impact
Successful exploitation of this vulnerability can have significant consequences. Attackers can gain unauthorized access to sensitive configuration files like secrets.json, potentially exposing API keys, passwords, and other confidential information. Furthermore, the ability to delete arbitrary files allows attackers to disrupt the application’s functionality or even render a user’s account unusable by deleting critical files such as settings.json. The risk is amplified in multi-user environments or remotely-accessible deployments, where the impact can extend to multiple users.
Recommendation
- Upgrade to SillyTavern version 1.17.0 or later to patch CVE-2026-34524.
- Deploy the Sigma rule “Detect SillyTavern Path Traversal Attempt via API Export” to detect attempts to exploit the
/api/chats/exportendpoint by monitoring for path traversal sequences in thecs-uri-queryfield. - Deploy the Sigma rule “Detect SillyTavern Path Traversal Attempt via API Delete” to detect attempts to exploit the
/api/chats/deleteendpoint by monitoring for path traversal sequences in thecs-uri-queryfield. - Review web server access logs for unusual requests to
/api/chats/exportor/api/chats/deletewith suspiciousavatar_urlparameters.
Detection coverage 3
Detect SillyTavern Path Traversal Attempt via API Export
highDetects attempts to exploit the path traversal vulnerability in the /api/chats/export endpoint by looking for path traversal sequences in the avatar_url parameter.
Detect SillyTavern Path Traversal Attempt via API Delete
highDetects attempts to exploit the path traversal vulnerability in the /api/chats/delete endpoint by looking for path traversal sequences in the avatar_url parameter.
Detect SillyTavern requests to sensitive files
mediumDetects requests to sensitive files such as secrets.json and settings.json via the SillyTavern API
Detection queries are kept inside the platform. Get full rules →