/

CVE-2026-73079

Severity:

HIGH RISK

(8.5)

Path Traversal (CWE-22) in Sub2API Response Endpoints

CVE-2026-73079

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-441

Impact:

Unauthorized Upstream Request Relay and Credential Abuse

Severity:

HIGH RISK

(8.5)

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

Sub2API contains a path traversal flaw in wildcard response routes that allows an authenticated tenant to influence the upstream request path. Under affected configurations, an attacker may relay requests to arbitrary upstream endpoints using shared operator-owned provider credentials.

Affected context

The vulnerability occurs in Sub2API versions 0.1.135 through 0.1.168 when tenant-facing response routes construct upstream URLs from an unvalidated client-supplied subpath. Risk is highest when the gateway uses shared ChatGPT, Codex OAuth, OpenAI platform, or operator-configured provider credentials for upstream requests.

Exploit preconditions

  • Attack surface: Authenticated tenant-facing POST /responses/*subpath routes
  • Required access: A valid platform API key issued to a tenant
  • Trigger point: Processing and forwarding of the client-controlled wildcard subpath
  • Why exploitation is possible: The route does not sufficiently constrain the supplied path, allowing traversal into unintended upstream endpoints while the gateway attaches pooled provider credentials

Why this happens

The underlying defect is an insufficiently constrained path component used to construct an upstream URL. Client-controlled path data is spliced into a privileged request target without canonicalization, allowlisting, or strict route-boundary enforcement. This maps primarily to CWE-22: Path Traversal and is related to CWE-441: Unintended Proxy or Intermediary ('Confused Deputy'), because the gateway can be induced to use the operator's credentials on behalf of a less-privileged caller.

Potential impact

  • Unauthorized access to upstream API functionality
  • Consumption or abuse of pooled provider quotas
  • Exposure of responses returned by unintended upstream endpoints
  • Disclosure or misuse of operator-owned credentials through forwarded requests
  • Increased costs, service disruption, or provider account restrictions

General mitigation guidance

Mitigation generally focuses on separating tenant-controlled routing from privileged upstream request construction.

Common defensive patterns include:

  • Restricting upstream destinations and paths with explicit route allowlists
  • Canonicalizing and validating path components before URL construction
  • Rejecting traversal sequences, encoded separators, and unexpected path forms
  • Keeping tenant authorization checks aligned with each upstream operation
  • Avoiding shared credentials where per-tenant credentials or narrowly scoped tokens are feasible
  • Applying least privilege, quota controls, and destination-level network policies to gateway workers
  • Preventing client input from selecting arbitrary hosts, bases, or provider endpoints

How teams detect issues like this

Detection can include:

  • Static analysis for string concatenation or URL joining involving request paths and privileged upstream clients
  • Code review checks for wildcard routes lacking canonicalization and destination allowlisting
  • Runtime logging of normalized route paths, selected upstream operations, and tenant-to-provider mappings
  • Alerts for traversal markers, encoded separators, unexpected endpoint prefixes, or unusual quota consumption
  • Policy enforcement requiring approved upstream destinations and explicit route schemas
  • Automated security review tools that identify SSRF, proxy-confusion, and path-validation patterns

Sources

SourceLink
github.comgithub.com/Wei-Shaw/sub2api/commit/017f6bbd5edffea0639ef3c84c0391161983f1f3
github.comgithub.com/Wei-Shaw/sub2api/pull/5137
github.comgithub.com/Wei-Shaw/sub2api/releases/tag/v0.1.169
github.comgithub.com/Wei-Shaw/sub2api/security/advisories/GHSA-vrxq-qm4h-6hgg

Frequently asked

questions

Yes, within the application's authenticated attack surface. A tenant can potentially exploit the issue by sending a crafted request to the affected response route, subject to deployment and authentication controls.

The attacker generally needs a valid tenant platform API key. Anonymous access is not required if the route is protected as described.

Treat the wildcard subpath as untrusted data, enforce a strict allowlist of valid upstream operations, canonicalize paths, and prevent tenant input from selecting arbitrary privileged destinations.

Use explicit route definitions, separate tenant authorization from upstream credential handling, apply least-privilege provider credentials, and monitor unusual upstream paths and quota usage.

Find out what's already
exploitable in your codebase.