Summary
A missing authentication and authorization check in the Chartbrew chart filter endpoint allows unauthenticated users to query chart data across any team or project.
When the vulnerable POST /project/:project_id/chart/:chart_id/filter endpoint is exposed, an attacker can access chart data without a valid user token or project permissions.
Affected context
This vulnerability affects Chartbrew deployments where the chart filter API endpoint is reachable from untrusted networks (such as the public internet).
Specifically, it occurs on the POST /project/:project_id/chart/:chart_id/filter route when:
- The route is registered without
verifyToken(authentication) middleware - The route is missing
checkPermissions(authorization) middleware - Chart data includes information pulled directly from connected databases or APIs that may be sensitive
In such configurations, the endpoint may respond to any unauthenticated request with filtered chart data.
Exploit preconditions
- Attack surface: HTTP(S) API endpoint
POST /project/:project_id/chart/:chart_id/filter - Required access: Network access to the Chartbrew server; no valid account or token required
- Trigger point: Sending crafted POST requests to the chart filter endpoint with arbitrary
project_idandchart_idvalues - Why exploitation is possible: The endpoint omits authentication (
verifyToken) and authorization (checkPermissions) middleware, so the server does not verify the caller's identity or project membership before returning chart data
Why this happens
The root cause is incomplete enforcement of authentication and authorization on a data-bearing API endpoint.
In web applications, route handlers commonly rely on middleware to perform identity verification and permission checks.
For the chart filter endpoint, these middleware layers were not attached, meaning the handler assumes the request is trusted and proceeds to process and return chart data.
This maps to CWE-306: Missing Authentication for Critical Function, where sensitive operations are exposed without requiring the user to prove their identity.
Potential impact
- Unauthenticated users may retrieve chart data belonging to any team or project.
- Attackers could infer or aggregate sensitive business metrics or operational data from exposed charts.
- Data from underlying databases or APIs surfaced in charts can be indirectly disclosed.
- Information gathered via charts may be used to support further attacks such as profiling, phishing, or competitive intelligence gathering.
General mitigation guidance
Effective mitigation focuses on enforcing authentication and authorization on all data-accessing endpoints and treating them as sensitive by default.
Common defensive patterns include:
- Systematically applying authentication middleware (e.g., token or session verification) to all API routes that return project or chart data.
- Applying fine-grained authorization checks that ensure the caller is a member of the relevant team/project and has the appropriate role.
- Adopting a secure-by-default routing pattern where routes opt-out of protection only in clearly documented, low-risk cases (e.g., a global auth guard).
- Centralizing access control logic to reduce the chance of new endpoints being added without necessary security checks.
- Reviewing chart contents and data sources to minimize exposure of highly sensitive information through dashboards and filters.
How teams detect issues like this
Organizations can detect this class of vulnerability through a combination of code and runtime analysis:
- Static analysis & code review:
- Search for route definitions that interact with project or chart identifiers but lack authentication and authorization middleware.
- Enforce coding standards that require explicit access control declarations for routes under
/projector similar namespaces. - Use linting or SAST rules that flag handlers accessing sensitive models (e.g., charts, projects, teams) without prior identity checks.
- Runtime and configuration checks:
- Conduct API security testing and fuzzing against endpoints to confirm that unauthenticated requests are rejected as expected.
- Use WAF or API gateways with policies requiring authentication for specific URL patterns that serve sensitive data.
- Monitor logs for anomalous access to chart filter endpoints from unknown or unauthenticated sources.

