CVE-2026-34522: SillyTavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory
Summary A path traversal vulnerability in /api/chats/import allows an authenticated attacker to write attacker-controlled files outside the intended chats directory by injecting traversal sequences into charactername. Details charactername is used unsafely as part of the destination filename and then passed into path.join(...) without sanitization.
Published Apr 1, 2026 · Updated Apr 6, 2026
Affected packages
sillytavern
- Ecosystem
- npm
- Affected
- <= 1.16.0
- Fixed in
- 1.17.0
- Check
npm ls sillytavern
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A path traversal vulnerability in /api/chats/import allows an authenticated attacker to write attacker-controlled files outside the intended chats directory by injecting traversal sequences into character_name.
Details
character_name is used unsafely as part of the destination filename and then passed into path.join(...) without sanitization.
Evidence:
- Import handler entrypoint:
- Unsanitized
character_nameused in output filename: - Same write pattern in JSONL import branch:
- Endpoint auth context (authenticated user access):
Example payload:
character_name=../../../../tmp/st_poc
This causes the final destination path to escape from <user>/chats/<avatar>/... and write to an attacker-controlled location such as /tmp/... (or any writable path for the service account).
PoC
Prerequisites:
- Valid authenticated session cookie (
cookie.txt) - Valid CSRF token (
$TOKEN)
Prepare payload:
printf '{"user_name":"u","chat_metadata":{}}\n{"name":"u","mes":"owned"}\n' >/tmp/poc.jsonlTrigger arbitrary write:
curl -b cookie.txt -H "x-csrf-token: $TOKEN" \
-F "avatar=@/tmp/poc.jsonl" \
-F "file_type=jsonl" \
-F "avatar_url=a.png" \
-F "character_name=../../../../tmp/st_poc" \
-F "user_name=u" \
http://TARGET:8000/api/chats/importObserved result:
- A file is created outside chats directory, for example:
/tmp/st_poc - <timestamp> imported.jsonl
Impact
- Integrity: attacker can create files in unintended filesystem locations.
- Availability: can be used for disk abuse and disruptive file placement.
- Can become more severe when chained with other local processing behaviors.
Resolution
The issue was addressed in version 1.17.0
Credited to maru1009.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-46372
SillyTavern: SSRF in SearXNG Search Proxy via Unvalidated baseUrl
high8.5May 19, 2026CVE-2026-44648
SillyTavern: Existing sessions are not invalidated after password change, allowing session reuse and account takeover
high7.5May 12, 2026CVE-2026-44649
SillyTavern has Authentication Bypass via SSO Header Injection
critical9.8May 12, 2026CVE-2026-44650
SillyTavern has a Path Traversal issue
critical9.1May 12, 2026CVE-2026-44651
SillyTavern has a reflected XSS vulnerability in the CORS proxy middleware
medium6.9May 12, 2026CVE-2026-44652
SillyTavern has a SSRF vulnerability in the CORS proxy middleware
medium6.9May 12, 2026
