{"id":"CVE-2026-34523","aliases":["GHSA-525j-2hrj-m8fp"],"url":"https://o3.security/vulnerability/CVE-2026-34523","summary":"SillyTavern: Path traversal allows file existence oracle","details":"### Summary\n\nA path traversal vulnerability in the static file route handler allows any unauthenticated user to determine whether files exist anywhere on the server's filesystem. By sending percent-encoded `../` sequences (`%2E%2E%2F`) in requests to static file routes, an attacker can check for the existence of files (404 if it doesn't exist, 403 means it exists).\n\n### Details\n\nThe vulnerability is in `createRouteHandler` (`src/users.js:947–963`), which backs all user-data static file routes:\n\n```javascript\nfunction createRouteHandler(directoryFn) {\n    return async (req, res) => {\n        const directory = directoryFn(req);\n        const filePath = decodeURIComponent(req.params[0]);\n        const exists = fs.existsSync(path.join(directory, filePath)); // no boundary check here\n        if (!exists) {\n            return res.sendStatus(404);\n        }\n        return res.sendFile(filePath, { root: directory });\n    };\n}\n```\n\n`req.params[0]` contains the raw (percent-encoded) wildcard from the URL. After `decodeURIComponent`, a request path like `/characters/%2E%2E%2F%2E%2E%2FUsers/kirakira` decodes to `../../Users/kirakira`, and `path.join` resolves it outside the intended directory. `res.sendFile` correctly blocks the file from being served (the `send` module's root check returns 403), but `fs.existsSync` had already run, and the 403/404 distinction reveals the result.\n\nAffected routes (they all use the same handler, so they're all affected):\n\n- `/characters/*`\n- `/user/files/*`\n- `/assets/*`\n- `/user/images/*`\n- `/backgrounds/*`\n- `/User%20Avatars/*`\n\n### PoC\n\n```bash\ncurl -o /dev/null -s -w \"%{http_code}\\n\" \"http://localhost:8000/characters/%2E%2E%2F%2E%2E%2F%2E%2E%2F%2E%2E%2F%2E%2E%2F%2E%2E%2F%2E%2E%2FUsers/kirakira/something\"\n```\n\n### Impact\n\nWhile file contents cannot be read (the `send` module blocks actual delivery), anyone who can reach the SillyTavern HTTP port can check the existence of files on the host filesystem.\n\n### Resolution\n\nThe issue was addressed in version 1.17.0.","published":"2026-04-02T17:14:31.694Z","modified":"2026-08-12T03:51:49.396650783Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"},"epss":{"score":0.00449,"percentile":0.37147,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"sillytavern","fixedVersion":"1.17.0"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/SillyTavern/SillyTavern/releases/tag/1.17.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34523.json"},{"type":"ADVISORY","url":"https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-525j-2hrj-m8fp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34523"},{"type":"PACKAGE","url":"https://github.com/SillyTavern/SillyTavern"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:49.396650783Z"}}