/

CVE-2026-59708

Severity:

HIGH RISK

(7.5)

Missing Authorization Checks (CWE-862) in Ghostfolio API

CVE-2026-59708

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Data Exposure

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

An authorization flaw in Ghostfolio's public portfolio API allows requests with a private access ID to bypass grantee user filtering and access full portfolio data.

An attacker who obtains or guesses a private access ID can retrieve sensitive investment details, including holdings, quantities, buy prices, and performance metrics, without any authentication.

Affected context

This vulnerability appears in Ghostfolio deployments exposing the /api/v1/public/:accessId/portfolio endpoint.

It manifests when private access IDs are treated as sufficient proof of access without enforcing checks that tie the access ID to a specific grantee user or session.

Environments where access IDs are shared, logged, or guessable are more exposed, particularly if portfolio links are reused or embedded in other systems.

Exploit preconditions

  • Attack surface: HTTP GET requests to /api/v1/public/:accessId/portfolio
  • Required access: Knowledge or discovery of a valid private accessId; no login or session required
  • Trigger point: Submission of a request with a valid accessId where grantee user constraints are not evaluated
  • Why exploitation is possible: The endpoint trusts possession of the accessId alone and does not enforce authorization logic (e.g., granteeUserId matching) before returning full portfolio contents

Why this happens

The issue stems from missing or incomplete authorization controls on a supposedly public-facing API that still serves sensitive data.

Specifically, the endpoint relies solely on a private accessId token and fails to verify that the requester is an authorized grantee (for example, via granteeUserId filtering or binding the token to a user context).

This aligns with CWE-862: Missing Authorization, where an application does not perform necessary access checks before allowing operations that expose or manipulate protected resources.

Potential impact

  • Unauthenticated parties can view full portfolio compositions and holdings
  • Exposure of transaction history, buy prices, and performance metrics
  • Leakage of inferred financial status or investment strategies of users
  • Potential privacy violations and regulatory compliance issues related to financial data

General mitigation guidance

Effective mitigation focuses on enforcing robust authorization checks for all endpoints that return sensitive data, even if they appear "public" by design.

Common patterns include:

  • Binding access tokens or IDs to a specific user or grantee identity and validating this relationship on every request
  • Implementing explicit authorization middleware for all portfolio-related routes, ensuring least-privilege access
  • Treating any identifier used to retrieve sensitive data as secret and time-bound, with rotation and revocation capabilities
  • Minimizing the amount of sensitive information exposed via public endpoints and separating anonymous views from detailed financial data

How teams detect issues like this

Detection typically involves reviewing API routes and access control logic to ensure that every protected resource is subject to consistent authorization checks.

Helpful approaches include:

  • Static analysis or linting rules that flag controller actions lacking authorization middleware or policy checks
  • Code review checklists that require reviewers to confirm authorization enforcement on any endpoint returning user-specific or financial data
  • Centralized access control policies (e.g., decorators, filters, or guards) that make missing authorization enforcement more visible
  • Logging and monitoring for unusual access patterns to public endpoints that return sensitive portfolio details

Sources

SourceLink
github.comgithub.com/ghostfolio/ghostfolio
github.comgithub.com/ghostfolio/ghostfolio/commit/697ef59e3b58bebc5c21a9e482e4f5643390f316
github.comgithub.com/ghostfolio/ghostfolio/issues/7197
vulncheck.comvulncheck.com/advisories/ghostfolio-unauthorized-portfolio-data-exposure-via-public-endpoint

Frequently asked

questions

Yes. Anyone who can reach the Ghostfolio API over the network and obtain a valid private accessId can exploit this issue without interacting with the legitimate user.

No. The flaw exists specifically because sensitive portfolio data is returned based solely on the accessId, without requiring the requester to be authenticated or associated with the grantee user.

Ensure that every endpoint returning user-specific or financial data enforces explicit, centralized authorization checks that verify the caller's identity and relationship to the requested resource, rather than trusting any single identifier such as an access token or ID alone.

Adopt a uniform access control architecture where all handlers pass through shared authorization middleware, treat any "public" identifiers to sensitive data as secrets tied to identity and context, and incorporate security-focused reviews and automated checks into the development and deployment pipelines.

Find out what's already
exploitable in your codebase.