Summary
UptimeFlare exposed sensitive server-side configuration data to all visitors by bundling a server-only workerConfig object into client-side JavaScript.
When the incidents page imported and used workerConfig inside a client component, the entire configuration was shipped to browsers, allowing anyone with access to the status page to retrieve sensitive information.
Affected context
This vulnerability affects UptimeFlare deployments that:
- Use the
uptime.config.tsfile to define both client-facing and server-only configuration in the same module, and - Bundle React/Next.js-like pages where components can be rendered on the client.
Because pages/incidents.tsx imported workerConfig into a client-side component, build tooling treated workerConfig as safe to publish and embedded it into the generated JavaScript served to all visitors of the incidents page. The issue manifests when server-only values (such as API keys, secrets, or internal endpoints) are referenced in code that can run in the browser.
Exploit preconditions
- Attack surface: Public web interface (status/incident pages served by UptimeFlare).
- Required access: Any unauthenticated user with the ability to load the affected incidents page in a browser.
- Trigger point: Loading or inspecting the client-side JavaScript bundle that includes
workerConfig. - Why exploitation is possible: The build system cannot inherently distinguish server-only configuration from client-safe data when they are exported from the same module and imported into client components. As a result, the bundler inlines the
workerConfigobject into the browser bundle, making its contents accessible via browser dev tools, network traces, or automated scraping.
Why this happens
The root cause is an information exposure design flaw where server-only configuration was not properly segregated from client-consumable configuration.
In uptime.config.ts, both pageConfig (intended for client-side use) and workerConfig (intended strictly for server-side use, with sensitive data) were exported from the same module. A client-side component (pages/incidents.tsx) imported workerConfig, which signaled to the bundler that it was safe to embed in the client bundle.
This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, specifically the sub-pattern where internal configuration and secrets are exposed due to mixing trust boundaries between server and client code. Abstractly, any architecture that shares modules between privileged and unprivileged environments without clear boundary enforcement can inadvertently leak sensitive data by inclusion in compiled or generated artifacts.
Potential impact
- Unauthorized disclosure of API keys, tokens, or credentials contained in
workerConfig. - Exposure of internal service endpoints, monitoring URLs, or infrastructure details that could aid further attacks.
- Abuse of monitoring or backend APIs using the leaked configuration to impersonate the service or tamper with data.
- Increased risk of account takeover or lateral movement into other systems that trust the exposed secrets.
- Reputation damage due to visible misconfiguration and potential downtime or data integrity issues.
General mitigation guidance
Effective mitigation centers on strict separation of server-only and client-visible configuration and clear trust boundaries in shared modules.
Recommended patterns include:
- Separate modules by trust level: Place server-only configuration (secrets, private endpoints, tokens) in modules that are never imported by client-side code. Use distinct files or directories for server and client configurations.
- Use environment-variable based configuration on the server: Read sensitive values from server-only environment variables at runtime instead of exporting them from shared TypeScript/JavaScript files.
- Create explicit DTOs for the client: Derive a minimal, sanitized
publicConfigobject from richer server configuration, containing only values safe for exposure, and export that for client consumption. - Enforce least-privilege configuration: Avoid placing unnecessary secrets or highly privileged credentials in global configuration objects; use narrower, per-service credentials and scoping.
- Adopt framework-level constraints: Where supported, use framework conventions (
server-onlymodules, server components, or config separation) that prevent accidental imports of privileged data into client bundles.
These patterns help ensure that even if code is refactored or reused, sensitive values cannot easily cross into untrusted environments.
How teams detect issues like this
Organizations can detect similar information exposure issues through a combination of build-time and review-time checks:
- Static analysis for client bundles: Scan JavaScript bundles for patterns resembling keys, tokens, secrets, or URLs that match internal endpoints (e.g., via regex and entropy-based detectors).
- Module boundary checks: Use static analysis or custom linting rules to flag imports of server-only modules (e.g.,
workerConfigfiles or modules that access secrets) from client or browser-targeted code. - Code review practices: In reviews, treat any configuration module used by both server and client as a potential boundary violation. Look for exports that include secrets, credentials, or internal endpoints.
- Policy enforcement in CI/CD: Add automated checks that fail builds when secrets are detected in generated assets, or when server-only modules are referenced in client build targets.
- Runtime monitoring: Use CSP reports, integrity checks, or periodic bundle inspection to ensure no new sensitive strings appear in production client assets after code changes.
Automated code scanning and secret-detection tools can complement manual reviews by continuously watching for regressions as the codebase evolves.

