/

CVE-2026-56233

Severity:

HIGH RISK

(8.3)

Path Traversal (CWE-22) in Capgo Builder Upload Proxy

CVE-2026-56233

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Server-Side Privilege Escalation via Path Traversal

Severity:

HIGH RISK

(8.3)

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

Capgo versions prior to 12.128.2 contain a path traversal flaw in the builder upload proxy that lets authenticated users with build permissions bypass intended upload path restrictions.

By appending traversal sequences that are normalized by the WHATWG URL parser, an attacker can reach internal administrative endpoints using the privileged BUILDER_API_KEY header, leading to server-side privilege escalation.

Affected context

This vulnerability arises in Capgo deployments where the builder upload proxy accepts user-controlled paths from authenticated builders and relies on URL normalization to construct internal request targets.

It becomes relevant when traversal sequences such as ../ are not fully sanitized before being processed by the WHATWG URL parser, and when the same proxy can access internal administrative endpoints using high-privilege headers.

Exploit preconditions

  • Attack surface: HTTP(S) interface of the Capgo builder upload proxy
  • Required access: Authenticated user account with build permissions and the ability to submit uploads
  • Trigger point: Submission of crafted upload requests containing path traversal sequences in the upload path
  • Why exploitation is possible: The proxy trusts normalized paths produced by the WHATWG URL parser without enforcing strict path constraints, allowing traversal out of the intended upload directory to internal admin endpoints that are invoked with a privileged BUILDER_API_KEY header

Why this happens

The core issue is improper restriction of file and resource paths derived from user input, mapping directly to CWE-22: Path Traversal.

The builder upload proxy composes backend URLs from user-supplied path fragments and relies on WHATWG URL normalization, but does not apply robust validation to ensure paths remain within allowed upload scopes.

As a result, traversal tokens are resolved into effective paths that can point to internal administrative endpoints, and the proxy forwards requests with elevated headers, unintentionally granting higher privileges to a lower-privileged client.

Potential impact

  • Authenticated users may gain access to internal administrative endpoints
  • Attackers could perform actions reserved for higher-privileged roles or service accounts
  • Configuration or metadata related to builds and deployments could be modified or exfiltrated
  • Further compromise of server-side components through misuse of the BUILDER_API_KEY privileges

General mitigation guidance

Effective mitigation focuses on constraining path handling and reducing implicit trust in normalized URLs.

Common defensive patterns include:

  • Enforcing strict allowlists or route-based mapping for upload paths and backend endpoints instead of directly using user-supplied path segments
  • Normalizing paths and then explicitly checking that the resolved path remains within an expected base directory or scope before processing
  • Separating internal administrative APIs from user-facing proxies to avoid privilege leakage through shared headers
  • Applying least-privilege principles to service headers and API keys so that builder-related credentials cannot perform unrelated administrative operations
  • Implementing centralized validation utilities for path and URL handling to avoid inconsistent checks across the codebase

How teams detect issues like this

Organizations can identify similar vulnerabilities by:

  • Using static analysis rules that flag concatenation of user-controlled path segments with internal URLs or filesystem locations
  • Reviewing proxy and routing code for any use of path normalization without subsequent boundary checks (e.g., ensuring paths stay within a configured base)
  • Inspecting use of privileged headers and API keys to confirm they are never attached to requests derived from user-controllable input
  • Implementing logging and anomaly detection for requests targeting internal endpoints from user-facing components, such as builder upload proxies
  • Applying security-focused code review checklists that explicitly cover CWE-22 risks around URL and path handling

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-qprp-873h-mx6f
vulncheck.comvulncheck.com/advisories/capgo-ssrf-and-privilege-escalation-via-path-traversal-in-builder-upload-proxy

Frequently asked

questions

Exploitation is limited to authenticated users with build permissions, but within that scope it can significantly elevate their capabilities by granting access to internal administrative endpoints.

An attacker needs valid builder-level credentials or an account with build permissions and the ability to submit uploads through the builder upload proxy.

The most robust fix is to strictly validate and constrain all paths derived from user input, use route mapping or allowlists instead of free-form path construction, and ensure that internal admin APIs are not reachable via user-facing proxies with privileged headers.

Design proxies and API gateways so that user input never directly determines internal resource paths, enforce normalization followed by boundary checks, separate privilege domains for internal and external traffic, and include CWE-22 path traversal checks in code review and automated testing policies.

Find out what's already
exploitable in your codebase.