Skip to main content

zrok CVE-2026-40302

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-04-16 https://github.com/openziti/zrok GHSA-4fxq-2x3x-6xqx
6.1
CVSS 3.1 · Vendor: https://github.com/openziti/zrok
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious refreshInterval-embedded OAuth URL
  2. Delivery
    Deliver URL to victim via phishing
  3. Exploit
    Victim authorizes via GitHub OAuth flow
  4. Execution
    OAuth callback triggers time.ParseDuration failure
  5. Persist
    Unescaped error rendered by text/template
  6. Impact
    Attacker JavaScript executes in OAuth server origin

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target zrok deployment to have GitHub OAuth authentication enabled for publicProxy or dynamicProxy endpoints - deployments not using GitHub OAuth are entirely unaffected. The attack is triggered specifically when the refreshInterval query parameter in the OAuth callback URL fails time.ParseDuration() parsing, causing the raw parameter value to be embedded into the HTML error response. The victim must actively click a crafted link and complete the full GitHub OAuth authorization flow (UI:R per CVSS). The attacker requires no account or credentials on the zrok instance (PR:N). Exploitation is further limited by the scope of impact: the injected script executes in the OAuth server's browser origin at the callback stage, before any session cookie is set, restricting exfiltration to DOM-visible content and OAuth server interactions only. Non-default GitHub OAuth configuration is the key deployment prerequisite limiting real-world exposure.

Impact

The CVSS 3.1 score of 6.1 (Medium) is consistent with the description: network-delivered (AV:N), low complexity (AC:L), no privileges required (PR:N), user interaction required (UI:R), scope change (S:C), and low confidentiality and integrity impact (C:L/I:L/A:N). All four signals - CVSS, EPSS (0.01%, 1st percentile), SSVC (Exploitation: none, Automatable: no, Technical Impact: partial), and absence from CISA KEV - are aligned, indicating no observed real-world exploitation and limited automated weaponization potential. The scope change (S:C) elevates the CVSS but the practical impact is constrained: because no session cookie is set at the OAuth callback stage, the injected script cannot steal authenticated credentials and is limited to DOM content and OAuth server interactions visible in that origin context. The mandatory user-interaction step (victim must both click the crafted link and complete the full GitHub OAuth flow) further reduces the realistic threat surface. For zrok operators with GitHub OAuth enabled, this represents a moderate phishing-amplified risk, not a mass-exploitation scenario. No CVSS-to-description conflicts identified.

Exploit ScenarioDerived

An attacker crafts a zrok GitHub OAuth login URL in which the refreshInterval parameter contains an HTML/JavaScript payload (e.g., refreshInterval=%3Cscript%3Ealert(document.domain)%3C%2Fscript%3E) and delivers it to a victim via phishing email or malicious link. The victim clicks the link, is redirected through GitHub's OAuth authorization, and upon returning to the zrok OAuth callback page, the time.ParseDuration failure causes the unescaped payload to be rendered in the error message, executing attacker-controlled JavaScript in the victim's browser within the OAuth server's origin. No public proof-of-concept exploit code has been identified at the time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Reflected XSS in zrok's GitHub OAuth callback allows an unauthenticated attacker to execute arbitrary JavaScript in the OAuth server's browser origin by delivering a crafted login URL to a victim. The proxyUi template engine uses Go's text/template (no HTML escaping) rather than html/template, and both publicProxy and dynamicProxy OAuth callback handlers embed the attacker-controlled refreshInterval query parameter verbatim into an error message when time.ParseDuration fails, rendering that error unescaped into HTML. Exploitation requires user interaction (victim must click the link and complete the GitHub OAuth flow); no active exploitation is confirmed (not in CISA KEV, EPSS 0.01%, SSVC exploitation: none), but a vendor-confirmed fix is available in v2.0.1 while v1.x remains unpatched.

RemediationAI

For zrok v2 deployments, upgrade to v2.0.1 or later; the release notes explicitly confirm the fix: 'Escaped proxyUi output by switching to html/template and removed reflected refreshInterval values from github oauth error pages' (https://github.com/openziti/zrok/releases/tag/v2.0.1). No patch has been released for v1.x (<=1.1.11) per the advisory; v1 operators should migrate to the v2 branch. For unpatched or unmigrated deployments, the most targeted compensating control is to disable GitHub OAuth integration for publicProxy and dynamicProxy if it is not operationally required - this eliminates the vulnerable code path entirely. If GitHub OAuth must remain enabled, deploying a WAF rule that blocks or strips the refreshInterval query parameter on OAuth callback requests (e.g., paths matching the GitHub OAuth callback endpoint) will prevent the malicious parameter from reaching the template. Restricting access to OAuth callback URLs by IP allowlist can reduce phishing exposure but will interfere with legitimate OAuth flows from arbitrary client IPs. Full advisory and patch reference: https://github.com/openziti/zrok/security/advisories/GHSA-4fxq-2x3x-6xqx.

Affected Packages

go github.com/openziti/zrok no fix
go github.com/openziti/zrok/v2 fix: 2.0.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

zrok is an open-source, Go-based network sharing and tunneling tool maintained by OpenZiti (pkg:go/github.com/openziti/zrok and pkg:go/github.com/openziti/zrok/v2). The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) is the use of Go's text/template package in endpoints/proxyUi/template.go (init() and WriteTemplate, lines 8, 18, 99) instead of html/template, which provides automatic contextual HTML escaping. The template variable {{ .Error }} at line 119 of template.html is rendered without escaping. When the GitHub OAuth callback handlers in publicProxy/providerGithub.go (lines 93, 128, 130) and dynamicProxy/providerGithub.go (lines 110, 146, 148) encounter a time.ParseDuration failure on the attacker-supplied refreshInterval parameter, they embed the raw, unvalidated input into the error struct and pass it to WriteTemplate. Because text/template does not sanitize output, the attacker's payload is emitted directly into the HTML response served by the OAuth callback endpoint.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/openziti/zrok) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

Network-delivered reflected XSS requires victim interaction (UI:R) and executes in OAuth server's origin (S:C), with no credentials needed and low bounded impact on confidentiality and integrity.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/openziti/zrok).

CVSS VectorVendor: https://github.com/openziti/zrok

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch released
Apr 17, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 16, 2026 - 21:08 nvd
MEDIUM 6.1

DescriptionCVE.org

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)

Threat Intelligence Overview

EPSS Score
0.0%
Top 99% exploitable
Prevalence
Low
niche open-source network tunneling tool, limited enterprise footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)CVE.org

pkg:go/github.com_openziti_zrok
pkg:go/github.com_openziti_zrok_v2

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy