/

CVE-2026-120426

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-639) in OpenCSG CSGHub Portal

CVE-2026-120426

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Unauthorized disclosure of private repository files

Severity:

HIGH RISK

(7.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

OpenCSG CSGHub's unauthenticated file resolve route may allow remote visitors to read files from private repositories. The risk arises when a user-controlled identity value in a file path is trusted while the portal uses its server-side API key to access repository content.

Affected context

The issue concerns the unauthenticated file resolve route in OpenCSG CSGHub through v2.6.0-ce. It becomes risky when the route accepts a percent-encoded current_user parameter in a file path and forwards the request using the portal's server API key, without ensuring the requester is authorized to access the target private repository. Affected content may include files in private model, code, or space repositories.

Exploit preconditions

  • Attack surface: The file resolve route is reachable remotely without authentication.
  • Required access: No authenticated account is described as necessary; the route must be accessible to the requester.
  • Trigger point: The route processes a file path containing a percent-encoded current_user parameter.
  • Why exploitation is possible: The portal forwards the request with its server API key, potentially treating a user-controlled identity value as sufficient authorization for private repository content.

Why this happens

The underlying issue is an authorization decision based on a user-controlled key or identity value. If a request parameter can influence which repository files the server retrieves, while the server's API key supplies its own authority, the route may fail to bind access to the actual requester's permissions. This matches CWE-639: Authorization Bypass Through User-Controlled Key.

Potential impact

  • An unauthenticated remote user may be able to read files from private repositories.
  • Confidential model, code, or space repository content could be exposed.
  • Disclosed files could contain sensitive project information or credentials, depending on repository contents.
  • Exposure could undermine the privacy expectations of repository owners and users.

General mitigation guidance

Defensive design generally separates the portal's service credentials from the requester's authorization context.

Common patterns include:

  • Deriving repository access from a verified authenticated principal rather than a user-controlled path value.
  • Enforcing authorization checks for every requested repository and file before using server-side credentials.
  • Restricting unauthenticated routes to resources explicitly intended to be public.
  • Validating and canonicalizing paths and parameters before they influence resource selection.
  • Limiting the scope and permissions of server-side API credentials.

How teams detect issues like this

Review route handlers and service calls for cases where user-controlled path or identity values select private resources while shared server credentials perform the retrieval. Static analysis and code review can look for missing authorization checks between resource selection and data access.

Operational monitoring can flag unauthenticated resolve requests involving private repositories, unusual encoded identity parameters, and mismatches between the requester and the identity used for authorization. Policy checks can require explicit authorization enforcement on routes that access private content.

Sources

SourceLink
github.comgithub.com/OpenCSGs/csghub-server/blob/v2.6.0-ce/api/middleware/authenticator.go#L210-L226
github.comgithub.com/OpenCSGs/csghub/blob/v2.6.0-ce/internal/handlers/frontend/resolve.go#L138-L151
github.comgithub.com/OpenCSGs/csghub/blob/v2.6.0-ce/internal/routes/router.go#L302-L303
github.comgithub.com/OpenCSGs/csghub/blob/v2.6.0-ce/pkg/server/backend/csghubserver/download.go#L10-L41
github.comgithub.com/OpenCSGs/csghub/issues/1586
github.comgithub.com/OpenCSGs/csghub/releases/tag/v2.6.0-ce
hackmd.iohackmd.io/@hieund/csghub-private-repo-file-read-idor
vulncheck.comvulncheck.com/advisories/opencsg-csghub-through-2.6.0-ce-unauthenticated-private-repository-file-read-via-resolve-route

Frequently asked

questions

The described route is remotely accessible without authentication, so a remote attacker may be able to attempt access to private files.

The description identifies the resolve route as unauthenticated; it does not describe an account as a prerequisite. The route must be reachable, and the vulnerable authorization behavior must be present.

Bind every private-file request to a verified requester identity and enforce repository-level authorization before using server-side credentials.

Avoid making authorization decisions from user-controlled identifiers alone. Review routes that use privileged service credentials, enforce least privilege, and add automated checks for authorization on private-resource access paths.

Find out what's already
exploitable in your codebase.