Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid tenant API key for target Sub2API instance
-
DeliveryCraft POST request to /responses/../../target/endpoint with traversal subpath
-
ExploitGateway splices unsanitized subpath into upstream URL
-
ExecutionRequest forwarded to arbitrary upstream endpoint using operator credentials
-
ImpactConsume operator quota or invoke restricted upstream operations as operator identity
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a valid tenant API key issued by a Sub2API operator running versions 0.1.135-0.1.168 - unauthenticated exploitation is not possible (CVSS PR:L). The attacker must be an enrolled tenant on the targeted platform; there is no guest or anonymous path to exploitation. The upstream impact scope depends on operator configuration: deployments using ChatGPT/Codex OAuth or OpenAI platform keys expose those credentials to relay abuse; deployments using an operator-configured base URL expose whatever service resides at that URL. No non-default configuration is required beyond a standard tenant deployment - the vulnerable wildcard route is a core gateway feature, not an optional one. Exploitation is limited by the fact that raw credential values cannot be exfiltrated; the attacker can only make upstream requests as the operator identity, and all such requests still traverse the operator's upstream account, creating an audit trail. |
| Impact | The CVSS 8.5 score with S:C accurately reflects that exploitation escapes the Sub2API trust boundary: the attacker does not merely affect the gateway but uses operator-owned upstream provider credentials to reach external AI provider APIs. The attack requires only low privilege (a valid tenant account, PR:L) and no special complexity (AC:L), making it straightforward for any enrolled tenant. No EPSS score was supplied in the input data, so exploitation probability cannot be independently quantified. There is no CISA KEV listing and no confirmed public exploit code; however, the GitHub security advisory, the PR diff with explicit test vectors (e.g., /v1/responses/../../x/y, /v1/responses/..%2f..%2fx/y), and the release tag are all publicly accessible - meaning any authenticated tenant can reconstruct a working exploit with minimal effort. The primary real-world risk is credential relay abuse: tenants can consume operator quota, access gated models, or trigger upstream provider operations using the operator's account identity. The impact is bounded by the fact that raw credential values cannot be extracted, only abused to make upstream requests. |
| Exploit ScenarioDerived | An authenticated tenant on a Sub2API deployment running versions 0.1.135-0.1.168 sends a POST request to /v1/responses/../../arbitrary/upstream/endpoint using their issued tenant API key. The gateway, performing no subpath validation, constructs an upstream URL that resolves outside the intended AI provider response prefix and forwards the request using the operator's pooled credentials. The tenant effectively acts as the operator on the upstream provider, potentially consuming quota, invoking restricted model endpoints, or triggering account-level operations on the operator's provider account. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
Path traversal in Sub2API versions 0.1.135-0.1.168 allows authenticated tenants to relay API requests to arbitrary upstream endpoints using operator-owned provider credentials (ChatGPT/Codex OAuth tokens, OpenAI platform keys, or operator-configured base URLs). The POST /responses/*subpath wildcard route accepted client-controlled subpaths and concatenated them into upstream URLs without sanitization, enabling scope-changing abuse of pooled shared accounts. No public exploit code has been identified at time of analysis, but the fix is publicly documented via GitHub advisory, PR diff, and release tag - including specific bypass path examples - substantially reducing reconstruction effort for any authenticated tenant.
RemediationAI
Upgrade to Sub2API v0.1.169, confirmed fixed in the tagged release at https://github.com/Wei-Shaw/sub2api/releases/tag/v0.1.169 and commit 017f6bbd5edffea0639ef3c84c0391161983f1f3. The fix introduces a guardResponsesSubpath middleware that validates all POST /responses/*subpath requests against an allowlist of forwardable paths before they reach the dispatching and forwarding layer. If immediate upgrade is not feasible, operators should restrict access to the /responses/*subpath route at the reverse-proxy or WAF layer by allowlisting only documented valid subpaths, noting that overly broad blocking may disrupt legitimate tenant functionality and requires careful mapping of permitted subpaths against in-use provider APIs. Operators who cannot rule out exploitation should rotate shared upstream provider credentials - OpenAI API keys and ChatGPT OAuth tokens - since those were exposed to arbitrary relay requests by affected versions. Audit upstream provider account logs for anomalous API calls or unexpected quota consumption during the affected version window.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Sub2API (CPE: cpe:2.3:a:wei-shaw:sub2api) is an AI API gateway that pools operator-owned provider credentials - OpenAI platform keys, ChatGPT/Codex OAuth tokens, or operator-configured base URLs - and distributes access to enrolled tenants via issued platform API keys. The gateway exposes wildcard routes (POST /responses/*subpath) designed to proxy requests to upstream AI provider endpoints. CWE-22 (Path Traversal) is the root cause: the client-controlled *subpath wildcard parameter was spliced directly into the upstream URL without sanitization, allowing sequences such as ../../ or URL-encoded variants (%2f, %2e%2e) to escape the intended path prefix and target arbitrary upstream hosts or endpoints. The patch, visible in the PR diff at https://github.com/Wei-Shaw/sub2api/pull/5137, introduces a guardResponsesSubpath middleware invoking service.IsForwardableOpenAIResponsesRequestPath to allowlist valid subpaths at the router edge. Analogous guards were added for Gemini model name path segments (IsSafeGeminiModelPathSegment) and xAI requestID fields, indicating the path-injection class was present across multiple handler surfaces in the codebase.
Know when Sub2api gets its next vulnerability
- 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
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
Tenant authentication required (PR:L), no special complexity, scope changes as operator upstream credentials relay requests to arbitrary external endpoints with high confidentiality impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Sub2API is an AI API gateway platform designed to distribute and manage API quotas from AI product subscriptions. From 0.1.135, to 0.1.168, platform API keys issued to tenants are exchanged for upstream requests made with shared provider accounts (ChatGPT/Codex OAuth, OpenAI platform keys, or an operator-configured base URL) that belong to the operator, not to the caller. The POST /responses/*subpath wildcard routes spliced the client-supplied subpath into the upstream URL with no validation. This lets an authenticated tenant relay requests to arbitrary upstream endpoints using pooled account credentials via a path traversal. This vulnerability is fixed in 0.1.169.
Executive ViewAI
Sub2API versions 0.1.135-0.1.168 permit authenticated users to misuse operator-managed API credentials (OpenAI keys, ChatGPT OAuth tokens) to relay requests to arbitrary external services, bypassing API scope restrictions. This enables unauthorized access to third-party systems using operator-controlled accounts. Organizations running these versions should immediately assess exposure and implement mitigations to prevent unauthorized API access through credential compromise.
No vendor-released patch identified at time of analysis. Implement these interim controls: (1) Deploy firewall rules restricting outbound API connections from Sub2API to explicitly approved endpoints only; (2) Enable request logging and anomaly detection on the POST /responses/* endpoint to detect path traversal attempts; (3) Minimize the quantity of operator-owned provider credentials stored within Sub2API systems; (4) Implement network segmentation to isolate Sub2API from direct outbound internet access where operationally feasible; (5) Monitor upstream API provider account logs for suspicious activity patterns on shared operator accounts; (6) If operationally feasible, disable or restrict the wildcard route to authenticated internal users only.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-56237
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB