/

CVE-2026-32252

Severity:

HIGH RISK

(7.7)

Improper Authorization in Chartbrew Template Generation

CVE-2026-32252

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-285

Impact:

Cross-Tenant Data Exposure

Severity:

HIGH RISK

(7.7)

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

A cross-tenant authorization bypass in Chartbrew's template generation endpoint allows an authenticated user with legitimate permissions in their own team to access template models for projects that belong to other teams.

Because the authorization check is not properly awaited and the project-team relationship is not enforced, attackers can request and receive victim project data by referencing a different project's identifier.

Affected context

This issue affects Chartbrew deployments where multiple teams (tenants) share the same instance and rely on access-control logic to isolate project data.

The vulnerable path is the HTTP handler for:

  • GET /team/:team_id/template/generate/:project_id

The risk appears when:

  • Users are authenticated and have template-generation permissions (updateAny on chart) in at least one team, and
  • The application does not strictly verify that the target project_id belongs to the specified team_id or to the caller's actual team.

Exploit preconditions

  • Attack surface: HTTP API endpoint GET /team/:team_id/template/generate/:project_id.
  • Required access: Valid authenticated user account with template-generation permissions in at least one team.
  • Trigger point: Attacker crafts a request where team_id and/or project_id reference a victim team's project, while still passing their own authorization check.
  • Why exploitation is possible:
  • The handler calls checkAccess(req, "updateAny", "chart") but does not await the returned promise, so the authorization result is effectively ignored or races.
  • The handler does not verify that project_id is owned by req.params.team_id or by the caller's team, enabling cross-tenant access by ID guessing or enumeration.

Why this happens

The root cause is an improper authorization implementation at the endpoint level, mapping to CWE-285: Improper Authorization.

Two related design flaws occur:

  1. The asynchronous authorization function is invoked without awaiting its result, so the access decision is never reliably enforced before returning data.
  2. The resource scoping logic fails to ensure that the requested project_id belongs to the team associated with the request or to the caller's actual team context.

Together, these issues break the intended multi-tenant isolation, allowing an authenticated user to read data tied to another tenant simply by referencing its project identifier.

Potential impact

  • Exposure of template models and related configuration from other teams' projects.
  • Unauthorized insight into how victim teams structure charts, queries, or data flows.
  • Potential leakage of sensitive metadata embedded in templates (e.g., field names, query fragments, or structural hints about underlying data).
  • Erosion of tenant isolation guarantees, undermining trust in a shared Chartbrew instance.

General mitigation guidance

Effective mitigation focuses on enforcing resource-scoped authorization and correct async access checks:

  • Ensure that all authorization helpers returning promises are awaited and their decisions are handled before any sensitive data is returned.
  • Implement strict ownership checks that bind each project to a specific team and validate that relationship for every request (e.g., query by project_id and team_id together).
  • Apply a consistent access-control layer that always evaluates both:
  • The caller's permissions (role, team membership, capabilities), and
  • The ownership and tenant context of the target resource.
  • Adopt secure-by-default APIs for permission checks, where failing to await or evaluate the result is harder or more obvious.
  • Limit the data returned by cross-team-capable endpoints and avoid exposing unnecessary internal details even on success.

How teams detect issues like this

Detection typically centers around identifying missing or ineffective authorization checks:

  • Static analysis and code review:
  • Search for authorization helpers (e.g., checkAccess) whose return values are ignored or not awaited in async handlers.
  • Flag handlers that accept tenant- or resource-identifiers in parameters (team_id, project_id) but do not verify the relationship between them at the database layer.
  • Review endpoints that combine user-supplied IDs with multi-tenant resources, checking for explicit tenant scoping in queries (e.g., WHERE team_id = ? AND id = ?).
  • Automated tests and policies:
  • Add multi-tenant integration tests that attempt cross-team access with valid but unauthorized accounts.
  • Use security test tooling or API fuzzers configured to try cross-tenant ID substitution across endpoints.
  • Runtime monitoring:
  • Log and alert on patterns where a user repeatedly accesses resources tied to teams they are not a member of.

Sources

SourceLink
github.comgithub.com/chartbrew/chartbrew/commit/bf5919043d3587fcbe76123aaabd9a0a9d1033f1
github.comgithub.com/chartbrew/chartbrew/security/advisories/GHSA-mw4f-cf22-qpcj

Frequently asked

questions

Yes. Any remote user who can authenticate and has template-generation permissions in at least one team can attempt to exploit this issue over the network by targeting the vulnerable endpoint.

The attacker does not need full administrative access, but they do need sufficient permissions to generate templates (updateAny on chart) in at least one team. A low-privilege user without such capabilities would not be able to trigger the vulnerable path as designed.

The safest pattern is to ensure that all authorization checks are awaited and enforced, and to consistently scope resource access by tenant:

  • Await authorization promises and handle denials before returning any data.
  • Always query and verify resources by both team_id and project_id (or equivalent tenant and resource identifiers) to guarantee ownership.

Prevention typically involves layering controls:

  • Centralize authorization logic in well-tested middleware or service layers rather than per-endpoint ad hoc checks.
  • Use strong typing or linting rules that flag unawaited promises in security-sensitive functions.
  • Add automated multi-tenant security tests that attempt cross-team access.
  • Establish code review guidelines that require explicit tenant and ownership checks for any endpoint handling identifiers across tenants.
Find out what's already
exploitable in your codebase.