{"id":"GHSA-xc4x-2452-5gc9","revision":"5619ccbc108e479893475c4057b73c23","records":[{"revision":"5619ccbc108e479893475c4057b73c23","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-xc4x-2452-5gc9","aliases":["CVE-2026-44651"],"title":"SillyTavern has a reflected XSS vulnerability in the CORS proxy middleware","description":"## Resolution\n\nFixed in SillyTavern 1.18.0: a user-provided URL is no longer reflected in the HTTP response body.\n\n## Overview\n- Vulnerability Type: XSS\n- Affected Location: `src/middleware/corsProxy.js:40`\n- Trigger Scenario: reflected XSS in CORS proxy error response\n\n## Root Cause\nWhen `fetch(url)` throws, the code sends:\n`res.status(500).send('Error occurred while trying to proxy to: ' + url + ' ' + error)`.\nThe `url` value is attacker-controlled (`req.params.url`) and is not HTML-escaped before rendering.\n\n## Source-to-Sink Chain\n1. Source (user-controlled input)\n- Entry point: `GET /proxy/:url(*)`\n\n2. Data flow\n- Code analysis shows concrete propagation into this sink:\n  - vulnerability title: `Reflected XSS in CORS proxy error response`\n  - sink location reached by attacker-controlled input: `src/middleware/corsProxy.js:40`\n- The same sink behavior is confirmed by controlled execution observations.\n\n3. Sink (dangerous operation)\n- Sink location: `src/middleware/corsProxy.js:40`\n- Vulnerable behavior: reflected XSS in CORS proxy error response\n\n## Exploitation Preconditions\n1. The attacker can inject controllable content into a rendered response.\n2. The vulnerable rendering context does not apply strict output encoding/sanitization.\n3. A victim user opens the affected page or response.\n\n## Risk\nThis issue enables script execution in the victim context and can compromise session or data integrity.\n\n## Impact\nAn attacker may run arbitrary JavaScript in the victim context, steal tokens, and manipulate user-visible behavior.\n\n## Remediation\n1. Never concatenate raw user input into HTML error responses.\n2. If URL echo is required, HTML-escape it or force plain-text output.\n3. Re-enable/strengthen CSP to reduce reflected injection impact.","state":0,"publishedAt":"2026-05-12T22:23:56+00:00","modifiedAt":"2026-06-09T10:45:18.4598624+00:00","affected":[{"ecosystem":"npm","name":"sillytavern","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.18.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/SillyTavern/SillyTavern/security/advisories/GHSA-xc4x-2452-5gc9","https://nvd.nist.gov/vuln/detail/CVE-2026-44651","https://github.com/SillyTavern/SillyTavern","https://github.com/SillyTavern/SillyTavern/releases/tag/1.18.0"],"sourceUrl":"https://github.com/advisories/GHSA-xc4x-2452-5gc9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-xc4x-2452-5gc9","identifiers":["GHSA-xc4x-2452-5gc9","CVE-2026-44651"]},"retained":false,"historicalAffected":[]}],"coverage":[]}