CVE-2026-40302
MediumCVSS 6.1Exploitation Probability (EPSS)
Low risk11th percentile - higher than 11% of all known CVEs
Summary
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 (no HTML escaping) instead of html/template, and the GitHub OAuth callback handlers in publicProxy and dynamicProxy embed the attacker-controlled refreshInterval parameter unescaped into an error message. An attacker can deliver a crafted login URL so that, after the victim completes the GitHub OAuth flow, the callback page executes arbitrary JavaScript in the OAuth server's origin.
Risk Assessment
XSS in the OAuth server context may allow an attacker to execute malicious script in the victim's browser and steal session data. Version 2.0.1 contains the fix.
Recommendation
Update zrok to version 2.0.1 or later. Until updated, consider restricting access to OAuth callback endpoints and monitoring for suspicious requests.
Other vulnerabilities in zrok
See all- CVE-2026-45568Critical
A vulnerability in zrok before version 2.0.3 allows an attacker to pass an absolute URL in the request path to the Flask proxy route of the Python SDK. The urllib.parse.urljoin function enables replacing the configured target host, causing the server to make a request to an attacker-chosen URL.
- CVE-2026-45576High
A vulnerability in zrok (versions 0.4.23 through 2.0.3) allows an attacker to write files outside the selected local destination root via attacker-controlled WebDAV or zrok drive paths like /../outside.txt. The issue is fixed in version 2.0.3.
- CVE-2026-40304Medium
zrok prior to version 2.0.1 contains a logical error in the ownership guard in the unaccess handler (controller/unaccess.go): when a frontend record has environment_id = NULL (the marker for admin-created global frontends), the condition short-circuits to false and allows deletion without ownership verification. A non-admin user who knows a global frontend token can permanently delete the global frontend, causing all public shares routed through it to become unavailable.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

