{"answers":{"affected":"6 open source packages ship an affected version, including github.com/openziti/zrok and github.com/openziti/zrok/v2. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40302 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2026-40302 is a medium-severity cross-site scripting vulnerability in openziti zrok, published on 17 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40302 and fix it if it is affected.\n\nWhat it is: CVE-2026-40302 is a medium-severity cross-site scripting vulnerability in openziti zrok, published on 17 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-40302 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/openziti/zrok (Go): affected all versions; no fix listed\n- github.com/openziti/zrok (Go): affected all versions up to 1.1.11; no fix listed\n- github.com/openziti/zrok (Go): affected all versions up to 1.1.11; no fix listed\n- github.com/openziti/zrok/v2 (Go): affected all versions; fixed in 2.0.1\n- github.com/openziti/zrok/v2 (Go): affected all versions; fixed in 2.0.1\n- github.com/openziti/zrok/v2 (Go): affected all versions; fixed in 2.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40302/ (Markdown: https://insights.sbomify.com/CVE-2026-40302/index.md)","id":"CVE-2026-40302","markdown":"https://insights.sbomify.com/CVE-2026-40302/index.md","name":"CVE-2026-40302","record":{"aliases":["GHSA-4fxq-2x3x-6xqx","GO-2026-5118"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"zrok web sharing","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in the OAuth server origin via reflected XSS in the GitHub OAuth callback, potentially leading to account takeover.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"zrok","vendor":"netfoundry"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"zrok has reflected XSS in GitHub OAuth callback via unsanitized refreshInterval error rendering","id":"CVE-2026-40302","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":6,"n_references":2,"next":{"headline":"zrok allows unauthenticated DoS via unbounded memory allocation in striped session cookie parsing","id":"CVE-2026-40303"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/openziti/zrok","purl":"pkg:golang/github.com/openziti/zrok","source":"GO-2026-5118"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["1.1.11"],"package":"github.com/openziti/zrok","purl":null,"source":"GHSA-4fxq-2x3x-6xqx"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["1.1.11"],"package":"github.com/openziti/zrok","purl":"pkg:golang/github.com/openziti/zrok","source":"GHSA-4fxq-2x3x-6xqx"},{"ecosystem":"Go","fixed":["2.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/openziti/zrok/v2","purl":null,"source":"GHSA-4fxq-2x3x-6xqx"},{"ecosystem":"Go","fixed":["2.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/openziti/zrok/v2","purl":"pkg:golang/github.com/openziti/zrok/v2","source":"GHSA-4fxq-2x3x-6xqx"},{"ecosystem":"Go","fixed":["2.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/openziti/zrok/v2","purl":"pkg:golang/github.com/openziti/zrok/v2","source":"GO-2026-5118"}],"prev":{"headline":"rhukster/dom-sanitizer: SVG \u003cstyle\u003e tag allows CSS injection via unfiltered url() and @import directives","id":"CVE-2026-40301"},"products":["zrok"],"published":"2026-04-17","related":[{"cvss_score":9.9,"headline":"zrok Python ProxyShare can be used as an SSRF proxy through absolute URL paths","id":"CVE-2026-45568","kev_date_added":null,"published":"2026-07-16"},{"cvss_score":8.7,"headline":"zrok: WebDAV drive backend follows symlinks outside DriveRoot, enabling host filesystem read/write","id":"CVE-2026-42275","kev_date_added":null,"published":"2026-05-08"},{"cvss_score":8.3,"headline":"zrok copy writes attacker-controlled WebDAV paths outside the destination root","id":"CVE-2026-45576","kev_date_added":null,"published":"2026-07-16"},{"cvss_score":7.5,"headline":"zrok allows unauthenticated DoS via unbounded memory allocation in striped session cookie parsing","id":"CVE-2026-40303","kev_date_added":null,"published":"2026-04-17"},{"cvss_score":5.3,"headline":"zrok's broken ownership check in DELETE /api/v2/unaccess allows non-admin to delete global frontend records","id":"CVE-2026-40304","kev_date_added":null,"published":"2026-04-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-18","vendors":["openziti"]},"summary":"Attackers can execute arbitrary JavaScript in the OAuth server origin via reflected XSS in the GitHub OAuth callback, potentially leading to account takeover.","url":"https://insights.sbomify.com/CVE-2026-40302/"}