/

CVE-2026-40601

Severity:

HIGH RISK

(7.5)

Missing Authorization in Chartbrew Chart Query Endpoint

CVE-2026-40601

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Data Access

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

Chartbrew 4.9.0 exposes the POST /api/chart/:chart_id/query endpoint without proper authorization checks, allowing unauthenticated callers to refresh chart data.

If an attacker can guess or obtain a valid chart identifier, they may trigger data refreshes and retrieve sensitive data from private charts that should not be publicly accessible.

Affected context

This vulnerability occurs in Chartbrew deployments using version 4.9.0 where:

  • The application exposes the /api/chart/:chart_id/query API endpoint over a network-accessible interface
  • Chart identifiers are stable and can be known, guessed, or inferred (e.g., via URLs, logs, or other leaks)
  • Private charts exist within non-public projects or behind sharing policies that should restrict data access

The issue arises because the endpoint only checks a team-level setting (allowReportRefresh) and does not verify whether the chart, project, or sharing policy permits anonymous access to the underlying data.

Exploit preconditions

  • Attack surface: HTTP(S) API endpoint at POST /api/chart/:chart_id/query
  • Required access: Network access to the Chartbrew instance; no user authentication is required
  • Knowledge required: A valid chart_id corresponding to an existing chart (obtainable via enumeration, logs, URLs, or information disclosure)
  • Trigger point: Sending a crafted POST request to the vulnerable endpoint, causing a data refresh and response
  • Why exploitation is possible: The endpoint enforces only a coarse team.allowReportRefresh flag and does not:
  • Confirm that the chart belongs to a public report
  • Validate the project's visibility (public vs private)
  • Respect sharing policies that should limit who can refresh or read chart data

Why this happens

The root cause is a missing authorization check on a sensitive operation that returns data based on underlying database/API queries.

While the endpoint performs a limited configuration check (team.allowReportRefresh), it fails to perform fine-grained access control to ensure the caller is authorized to access the specific chart and its associated project.

This maps to CWE-862: Missing Authorization, where the application exposes a function that requires a permission decision but either skips it entirely or relies on incomplete, indirect checks that do not reflect the actual resource-level policy.

Potential impact

  • Unauthenticated retrieval of data from private charts that should be restricted
  • Exposure of sensitive business metrics, customer information, or operational data visualized in private dashboards
  • Indirect leakage of schema details, query structures, or underlying data sources via chart responses
  • Support for further reconnaissance and targeted attacks using the disclosed data

General mitigation guidance

Effective mitigation focuses on enforcing consistent, resource-level authorization policies for every data-accessing endpoint:

  • Require authentication for any endpoint that can refresh or return chart data, unless explicitly designed as a public sharing interface
  • Implement authorization checks that bind the caller's identity and role to the specific chart and its project, verifying:
  • Ownership or membership in the relevant team/project
  • Project visibility (public vs private) and explicit sharing configuration
  • Permissions for actions such as "view", "refresh", or "export" on each chart
  • Centralize authorization decisions through a shared access control layer or service, instead of scattered ad-hoc flag checks
  • Default new endpoints to "deny by default" until explicit authorization requirements are defined and implemented
  • Regularly review public sharing features to ensure that only intentionally public resources bypass authentication, and that they still follow documented sharing rules

How teams detect issues like this

Organizations can identify similar issues using a combination of review and testing approaches:

  • Code review signals:
  • Endpoints that read or refresh data but only check configuration flags (e.g., team-level settings) instead of resource-level permissions
  • API controllers that access charts, dashboards, or reports without calling a centralized authorization helper or middleware
  • Conditional logic that assumes resources are public based on naming or defaults rather than explicit sharing configuration
  • Static analysis and policy checks:
  • Custom rules that flag controller methods which do not invoke an authorization check function when accessing protected models (charts, projects, teams)
  • Enforcement that all routes under certain prefixes (e.g., /api/chart) must pass through authentication and authorization middleware
  • Dynamic testing:
  • API security testing that attempts anonymous access to chart, dashboard, or report endpoints using guessed or reused identifiers
  • Regression tests that verify private resources are inaccessible without proper authentication and roles
  • Automated review tools or API security scanners can be integrated into CI/CD pipelines to highlight endpoints that are reachable without authentication yet return structured data.

Sources

SourceLink
github.comgithub.com/chartbrew/chartbrew/releases/tag/v5.0.0
github.comgithub.com/chartbrew/chartbrew/security/advisories/GHSA-cpr6-mhgm-893w

Frequently asked

questions

Yes. Any actor with network access to the Chartbrew instance can send requests to the vulnerable endpoint, and no authentication is required. Exploitation still depends on knowledge of valid chart identifiers.

Only network connectivity to the API and a valid chart_id. The attacker does not need an account, valid session, or team membership, making this a straightforward unauthenticated access control issue.

Require authentication for the POST /api/chart/:chart_id/query endpoint and enforce strict, resource-level authorization that checks the caller's rights against the chart, its project, and its sharing policy. Centralize this logic so all chart-related endpoints consistently consult the same access control rules.

Adopt a "default deny" access control model, mandate that every endpoint touching sensitive resources passes through standardized authentication and authorization middleware, and include automated tests and code review checklists that specifically verify authorization is present and aligned with documented sharing policies.

Find out what's already
exploitable in your codebase.