/

CVE-2026-45568

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in zrok Python SDK ProxyShare

CVE-2026-45568

Analyzed

Vulnerability type

Category:

Path Traversal / URL Path Manipulation

CWE:

CWE-22

Impact:

Server-Side Request Forgery (SSRF) and Internal Service Exposure

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal flaw in the zrok Python SDK ProxyShare Flask route allows an attacker-controlled absolute URL in the request path to override the configured proxy target.

When exploited, the proxy makes server-side HTTP requests to attacker-chosen URLs, enabling server-side request forgery and exposure of internal services whenever the proxy is reachable.

Affected context

This vulnerability appears in deployments using the zrok Python SDK's ProxyShare functionality with the Flask proxy route enabled.

The issue arises when the route accepts arbitrary absolute URLs as part of the request path and combines them using urllib.parse.urljoin without constraining the resulting destination.

Environments where the proxy has network access to internal or privileged endpoints (e.g., cloud metadata services, internal APIs, administrative interfaces) are more exposed.

Exploit preconditions

  • Attack surface: HTTP interface of the ProxyShare Flask route.
  • Required access: Ability to send crafted requests to the proxy route (typically remote or network-local access).
  • Trigger point: Supplying an absolute URL within the request path that urljoin uses to override the configured upstream host.
  • Why exploitation is possible: The proxy trusts the path component to construct the outbound URL, allowing an attacker-controlled absolute URL to bypass the intended target and redirect the server-side request to an arbitrary endpoint.

Why this happens

The root cause is improper canonicalization and validation of the request path when building the proxied URL.

The ProxyShare route uses urllib.parse.urljoin with user-supplied path data, permitting absolute URLs in the path to override the configured upstream host.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, generalized here as failing to restrict how user-controlled path or URL components influence resource resolution.

At a higher level, it is a URL construction bug where trust is incorrectly placed in unvalidated request path elements that control server-side network requests.

Potential impact

  • Attacker can cause the proxy to make HTTP requests to arbitrary external URLs.
  • Attacker may probe and access internal services reachable only from the proxy host.
  • Attacker could attempt to exfiltrate data from cloud metadata endpoints or internal APIs.
  • Attacker can leverage SSRF for further compromise depending on the internal network architecture.
  • Logging and monitoring data may be polluted with attacker-driven request patterns.

General mitigation guidance

Effective mitigation focuses on restricting how user input influences target URLs and applying strict destination controls.

Recommended patterns include:

  • Construct outbound URLs using fixed, trusted hosts and only append sanitized relative paths.
  • Reject or normalize any absolute URLs in request paths before URL construction.
  • Enforce an allowlist of permissible upstream hosts or endpoint paths for proxy requests.
  • Apply least-privilege network controls so proxy processes have minimal access to internal or sensitive services.
  • Introduce input validation and canonicalization layers that ensure paths stay within expected scopes and do not carry protocol or host components.

How teams detect issues like this

Detection commonly involves:

  • Static analysis or linters that flag uses of URL construction APIs (urljoin, requests, etc.) with unvalidated user-controlled input.
  • Code review practices focused on proxying logic, verifying that hosts are not derived from request paths or query parameters.
  • Runtime monitoring for unusual outbound traffic patterns from proxy services, such as requests to internal IP ranges or cloud metadata endpoints.
  • Policy-based checks in CI/CD pipelines enforcing that proxy components must use fixed upstream hosts and perform explicit validation of path segments.

Sources

SourceLink
github.comgithub.com/openziti/zrok/commit/7c1dc3ecd1c89d8cd2e845a72c3878bd2d31b4fe
github.comgithub.com/openziti/zrok/releases/tag/v2.0.3
github.comgithub.com/openziti/zrok/security/advisories/GHSA-jh67-hwqw-m5r7

Frequently asked

questions

Yes, if the ProxyShare Flask route is exposed over the network, an attacker who can send HTTP requests to it can exploit the flaw to direct server-side requests to arbitrary URLs.

The attacker needs the ability to interact with the vulnerable proxy endpoint. No local file system access is required; control of the request path is sufficient.

The safest approach is to ensure that the proxy constructs outbound requests using a fixed, trusted upstream host, while treating all user-supplied path elements as relative and strictly validated. Absolute URLs in the path should be rejected or stripped.

Preventative measures include consistently validating and normalizing URL and path input, avoiding the use of user-controlled data for host or scheme selection, employing allowlists for upstream destinations, and integrating security-focused reviews and automated checks for proxy and request-forwarding logic.

Find out what's already
exploitable in your codebase.