{"id":"CVE-2026-40302","published":"2026-04-17T20:56:08Z","modified":"2026-04-18T03:07:10Z","title":"zrok has reflected XSS in GitHub OAuth callback via unsanitized refreshInterval error rendering","vendor":"openziti","product":"zrok","tier":"tail","description":{"text":"zrok is software for sharing web services, files, and network resources. Prior to version 2.0.1, the proxyUi template engine uses Go's text/template (which performs no HTML escaping) instead of html/template. The GitHub OAuth callback handlers in both publicProxy and dynamicProxy embed the attacker-controlled refreshInterval query parameter verbatim into an error message when time.ParseDuration fails, and render that error unescaped into HTML. An attacker can deliver a crafted login URL to a victim; after the victim completes the GitHub OAuth flow, the callback page executes arbitrary JavaScript in the OAuth server's origin. Version 2.0.1 patches the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00213,"percentile":0.11775,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/openziti/zrok/security/advisories/GHSA-4fxq-2x3x-6xqx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/openziti/zrok/releases/tag/v2.0.1","tags":["x_refsource_MISC"]}],"priority":{"score":6.6,"factors":[{"name":"EPSS percentile","points":2.35},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"openziti","affectedVersions":[{"vendor":"openziti","product":"zrok","versions":["< 2.0.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-18T03:07:00.447331Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/openziti/zrok","vulnerableRanges":["<=1.1.11","all versions"],"patched":[],"from":["GHSA-4fxq-2x3x-6xqx","GO-2026-5118"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/openziti/zrok/v2","vulnerableRanges":["<2.0.1"],"patched":["2.0.1"],"from":["GHSA-4fxq-2x3x-6xqx","GO-2026-5118"],"provenance":"source"}],"summary":{"text":"The flaw is a reflected cross-site scripting vulnerability in zrok's GitHub OAuth callback handlers for publicProxy and dynamicProxy, caused by the proxyUi template engine using Go's text/template, which does not HTML-escape output. An attacker who can get a victim to open a crafted login URL with a malicious refreshInterval parameter, and who needs the victim to complete the GitHub OAuth flow, can run arbitrary JavaScript in the OAuth server's origin, with no authentication required by the attacker and user interaction required from the victim.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:37Z"},"euvd":{"id":"EUVD-2026-23547","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-40302","published":"2026-04-17","fixed":"2.0.1","kev":false},{"cve":"CVE-2026-40303","published":"2026-04-17","fixed":"2.0.1","kev":false},{"cve":"CVE-2026-40304","published":"2026-04-17","fixed":"2.0.1","kev":false},{"cve":"CVE-2026-42275","published":"2026-05-08","fixed":"2.0.2","kev":false,"link":{"from":"CVE-2026-40302","to":"CVE-2026-42275","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/openziti/zrok/v2","fromFixed":"2.0.1","toFixed":"2.0.2","daysApart":21}]}}],"package":"Go:github.com/openziti/zrok/v2"}}