Summary
Chartbrew allowed authenticated users to configure API data connections with arbitrary URLs that the server would fetch without validating the underlying destination.
This behavior enables Server-Side Request Forgery (SSRF), where an attacker can coerce the Chartbrew server into making requests to internal network services and cloud metadata endpoints that are not directly accessible from the Internet.
Affected context
The vulnerability occurs in Chartbrew deployments where authenticated users can create or edit API-based data connections.
When a user supplies a URL for an API connection, the server uses request-promise to fetch data without enforcing network egress restrictions, IP allowlisting/denylisting, or metadata endpoint protections.
This becomes risky in environments where Chartbrew runs with network access to private services (e.g., internal APIs, databases exposed over HTTP, admin panels, or cloud provider metadata services).
Exploit preconditions
- Attack surface: Application HTTP interface where users configure API data connections.
- Required access: Valid authenticated user account with permission to create or modify API connection configurations.
- Trigger point: Submitting or updating an API connection that points to an attacker-controlled or sensitive internal URL, causing the server to issue a backend HTTP request.
- Why exploitation is possible: The backend request logic trusts the user-supplied URL, performs no IP or host validation, and reuses the server's network position and privileges to reach targets the attacker cannot access directly.
Why this happens
This issue stems from treating user-controlled URLs as trusted destinations in server-side HTTP requests.
The backend component uses a generic HTTP client (request-promise) to fetch arbitrary URLs supplied in the API connection configuration without enforcing any network-layer constraints (such as restricting internal IP ranges or metadata endpoints).
This aligns with CWE-918: Server-Side Request Forgery, where an application allows an attacker to influence server-initiated requests, effectively turning the server into a proxy to internal or sensitive resources.
Potential impact
- Discovery and probing of internal network services reachable from the Chartbrew server.
- Access to cloud provider metadata endpoints, which can lead to credential exposure or environment compromise.
- Interaction with internal HTTP APIs, potentially including configuration panels, monitoring dashboards, or management interfaces.
- Use of HTTP methods that may modify internal systems' state if those endpoints do not enforce strong authentication.
- Pivoting into the internal network for further reconnaissance and follow-on attacks.
General mitigation guidance
Mitigation should focus on constraining where the server is allowed to connect and reducing trust in user-supplied URLs.
Common patterns include:
- Implement strict allowlists for outbound destinations or domains that API data connections may target.
- Block requests to private and link-local address ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.169.254) and to loopback or Unix socket endpoints.
- Normalize and parse user-provided URLs carefully before issuing requests, and reject malformed or obfuscated destinations.
- Introduce a controlled proxy or egress layer that enforces network policies, rather than letting the application connect directly.
- Run the application with minimized network reachability, segmenting it away from high-value internal services where possible.
How teams detect issues like this
Effective detection typically combines code analysis with runtime monitoring:
- Static analysis & code review:
- Search for backend HTTP calls that accept user-controlled URLs or hostnames.
- Flag usages of generic HTTP clients (e.g.,
request-promise,axios,fetch) where URL inputs are not validated or restricted. - Review configuration flows for "data source," "webhook," or "integration" features that perform server-side callbacks.
- Policy enforcement:
- Add linting rules or CI checks that require explicit validation logic around network calls driven by request parameters or configuration fields.
- Enforce architectural policies requiring outbound traffic to pass through an egress proxy with filtering.
- Runtime monitoring:
- Log and observe outbound HTTP requests, flagging connections to internal IP ranges or unusual domains triggered by user actions.
- Employ network-level monitoring/IDS rules to detect suspicious egress patterns from the application host or container.

