豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

zrok: Reflected XSS in GitHub OAuth callback via unsanitized refreshInterval error rendering

Moderate severity GitHub Reviewed Published Apr 16, 2026 in openziti/zrok • Updated Apr 16, 2026

Package

gomod github.com/openziti/zrok (Go)

Affected versions

<= 1.1.11

Patched versions

None
gomod github.com/openziti/zrok/v2 (Go)
< 2.0.1
2.0.1

Description

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

  • Attack Vector: Network — the attack is delivered as a crafted URL over the internet.
  • Attack Complexity: Low — no race conditions or special environment prerequisites.
  • Privileges Required: None — the attacker needs no account on the zrok instance.
  • User Interaction: Required — the victim must click the crafted link and complete the GitHub OAuth flow.
  • Scope: Changed — the injected script executes in the OAuth server's origin, not the victim's share origin.
  • Confidentiality Impact: Low — the script runs in the OAuth server origin after a failed flow; no session cookie is set at this point, limiting what can be exfiltrated to what is visible in the DOM and what can be requested from the OAuth server.
  • Integrity Impact: Low — the script can initiate new OAuth flows or submit forms on behalf of the victim in the OAuth server origin.
  • Availability Impact: None.

Affected Components

  • endpoints/proxyUi/template.go — init() / WriteTemplate (lines 8, 18, 99) — text/template used for HTML rendering
  • endpoints/proxyUi/template.html — line 119 — {{ .Error }} in HTML without escaping
  • endpoints/publicProxy/providerGithub.go — login callback closure (lines 93, 128, 130)
  • endpoints/dynamicProxy/providerGithub.go — loginHandler() (lines 110, 146, 148)

References

@mikegorman-nf mikegorman-nf published to openziti/zrok Apr 16, 2026
Published to the GitHub Advisory Database Apr 16, 2026
Reviewed Apr 16, 2026
Last updated Apr 16, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(1st percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Improper Encoding or Escaping of Output

The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved. Learn more on MITRE.

CVE ID

CVE-2026-40302

GHSA ID

GHSA-4fxq-2x3x-6xqx

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.