Skip to content

Commit 92a88a9

Browse files
1 parent 971e17e commit 92a88a9

2 files changed

Lines changed: 126 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-p6mr-xf3r-ghq4",
4+
"modified": "2026-04-01T21:36:06Z",
5+
"published": "2026-04-01T21:36:06Z",
6+
"aliases": [
7+
"CVE-2026-34749"
8+
],
9+
"summary": "Payload has a CSRF Protection Bypass in Authentication Flow",
10+
"details": "### Impact\n\nA Cross-Site Request Forgery (CSRF) vulnerability existed in the authentication flow. Under certain conditions, the configured CSRF protection could be bypassed, allowing cross-site requests to be made.\n\nConsumers are affected if ALL of these are true:\n\n- Payload version **< v3.79.1**\n- `serverURL` is configured\n\n### Patches\n\nThis vulnerability has been patched in **v3.79.1**. Additional validation has been added to the authentication flow.\n\nConsumers should upgrade to **v3.79.1** or later.\n\n### Workarounds\n\nThere is no complete workaround without upgrading. \n\nIf consumers cannot upgrade immediately, setting `cookies.sameSite` to `'Strict'` will prevent the session cookie from being sent cross-site. However, this will also require users to re-authenticate when navigating to the application from external links (e.g. email, other sites).",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "payload"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "3.79.1"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/payloadcms/payload/security/advisories/GHSA-p6mr-xf3r-ghq4"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34749"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/payloadcms/payload"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/payloadcms/payload/releases/tag/v3.79.1"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-352"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-01T21:36:06Z",
63+
"nvd_published_at": "2026-04-01T20:16:27Z"
64+
}
65+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-xvww-xhx6-22pf",
4+
"modified": "2026-04-01T21:36:40Z",
5+
"published": "2026-04-01T21:36:40Z",
6+
"aliases": [
7+
"CVE-2026-34522"
8+
],
9+
"summary": "SillyTavern has a path traversal in `/api/chats/import` allows arbitrary file write outside intended chat directory",
10+
"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",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "sillytavern"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "1.17.0"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 1.16.0"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-xvww-xhx6-22pf"
45+
},
46+
{
47+
"type": "PACKAGE",
48+
"url": "https://github.com/SillyTavern/SillyTavern"
49+
}
50+
],
51+
"database_specific": {
52+
"cwe_ids": [
53+
"CWE-22",
54+
"CWE-73"
55+
],
56+
"severity": "HIGH",
57+
"github_reviewed": true,
58+
"github_reviewed_at": "2026-04-01T21:36:40Z",
59+
"nvd_published_at": null
60+
}
61+
}

0 commit comments

Comments
 (0)