# CVE-2026-40302: zrok has reflected XSS in GitHub OAuth callback via unsanitized refreshInterval error rendering

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2026-04-16T21:08:55.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-4fxq-2x3x-6xqx, GO-2026-5118
- Weaknesses: CWE-79, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- openziti zrok: < 2.0.1
- github.com/openziti/zrok (Go): up to 1.1.11; all versions
- github.com/openziti/zrok/v2 (Go): before 2.0.1
- netfoundry zrok: before 2.0.1

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/openziti/zrok/security/advisories/GHSA-4fxq-2x3x-6xqx> (advisory, vendor-advisory, web)
- <https://github.com/openziti/zrok/releases/tag/v2.0.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40302> (advisory)
- <https://github.com/openziti/zrok> (package)

## Sources

- CVE List: [CVE-2026-40302](https://www.cve.org/CVERecord?id=CVE-2026-40302), CVE Terms of Use, modified 2026-04-18
- GitHub Advisory Database: [GHSA-4fxq-2x3x-6xqx](https://github.com/advisories/GHSA-4fxq-2x3x-6xqx), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5118](https://pkg.go.dev/vuln/GO-2026-5118), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40302](https://nvd.nist.gov/vuln/detail/CVE-2026-40302), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40302 · Whole record: https://cve.day/CVE-2026-40302.json · Rebuilt by cve.day 2026-11-25T22:59:18.969Z
