Summary
A missing access control check in Hoppscotch's onboarding configuration endpoint allows an unauthenticated attacker to overwrite critical infrastructure settings on a self-hosted instance via a single HTTP POST request.
By abusing this endpoint, an attacker can replace OAuth provider credentials, capture OAuth tokens and user email addresses, and obtain a recovery token that exposes stored secrets such as SMTP passwords and other credentials.
Affected context
This vulnerability affects self-hosted Hoppscotch deployments that expose the onboarding configuration endpoint (POST /v1/onboarding/config) to untrusted networks (e.g., the public internet or shared internal networks).
It is present when:
- The onboarding API is reachable without additional network-layer protection (VPN, IP allowlisting, etc.)
- The instance relies on Google/GitHub/Microsoft SSO for user authentication
- SMTP or other secrets are managed through Hoppscotch's configuration
The risk is highest in production environments where SSO is widely used and sensitive credentials are stored in the application.
Exploit preconditions
- Attack surface: The HTTP API endpoint
POST /v1/onboarding/config, accessible wherever the Hoppscotch backend is reachable. - Required access: No prior authentication or valid session is required; the attacker only needs network access to the instance.
- Trigger point: Sending a crafted POST request to the onboarding configuration endpoint, regardless of whether onboarding was previously completed.
- Why exploitation is possible: The endpoint lacks an authentication and authorization guard and does not verify onboarding state, allowing any caller to overwrite global configuration and obtain a recovery token exposing stored secrets.
Why this happens
The core issue is a missing authorization control on a high-privilege configuration endpoint, aligning with CWE-284: Improper Access Control and related CWE-287: Improper Authentication.
The onboarding configuration handler assumes either a trusted environment or a one-time, unauthenticated setup phase but does not enforce any check that:
- The caller is authenticated and authorized to manage instance-level settings, or
- Onboarding has not already been completed.
As a result, a low-complexity HTTP request from any network client can perform operations that should be restricted to an administrator, including:
- Overwriting OAuth provider credentials used for SSO,
- Changing infrastructure settings such as SMTP configuration, and
- Issuing a recovery token that grants access to plaintext secrets.
This pattern reflects a broader design flaw where "bootstrap" endpoints remain exposed after initial setup and are not protected by strong authentication, leading to configuration hijacking and downstream account compromise.
Potential impact
- Attackers can replace Google/GitHub/Microsoft OAuth application credentials with their own, enabling capture of OAuth tokens for all subsequent SSO logins.
- User email addresses and identity information can be harvested from SSO flows.
- Full disclosure of stored secrets, including SMTP passwords and other configured credentials, via the recovery token.
- Hijacking of email channels used by the application (e.g., password reset, notifications) by controlling SMTP settings.
- Persistent compromise of authentication flows and trust relationships even after the initial attack if changes are not detected and reverted.
- Potential pivoting into other systems that trust the compromised OAuth app or reuse the exposed credentials.
General mitigation guidance
Effective mitigation focuses on enforcing strict access control around onboarding and configuration endpoints and reducing the blast radius of any misconfiguration.
Recommended defensive patterns include:
- Protect onboarding flows with authentication and state checks:
- Require administrator-level authentication for any endpoint that writes global configuration.
- Implement a one-time onboarding state that, once completed, disables or restricts the onboarding route to authenticated admins only.
- Enforce fine-grained authorization on configuration changes:
- Gate changes to OAuth providers, SMTP, and other critical settings behind explicit admin roles or dedicated management interfaces.
- Apply server-side authorization checks based on roles, not client-side assumptions.
- Harden secret handling and recovery mechanisms:
- Scope recovery tokens to the minimum necessary privilege, with short lifetimes and single-use constraints.
- Avoid returning full plaintext secrets in API responses; provide redacted views and separate, tightly controlled secret-rotation workflows.
- Isolate and validate identity provider configuration:
- Treat OAuth client IDs/secrets as high-value assets and limit who and what can modify them.
- Consider configuration-layer separation where identity provider settings are managed via infrastructure or deployment configuration rather than runtime endpoints.
- Reduce external exposure:
- Restrict access to administrative and onboarding endpoints via network controls such as IP allowlists, VPN-only access, or admin subnets.
- Use reverse proxy rules or API gateways to separate public user APIs from administrative APIs.
- Apply least privilege and observability:
- Ensure application roles and service accounts only have the permissions strictly required.
- Log configuration changes with sufficient detail to audit when and how critical settings are modified.
How teams detect issues like this
Organizations can detect and monitor for similar misconfigurations and abuses by combining code-level checks, deployment-time validation, and runtime monitoring:
- Static analysis and code review:
- Flag any controller or route that modifies global configuration, identity provider settings, or secret management, ensuring it is wrapped with both authentication and authorization middleware.
- Search for "onboarding" or "setup" endpoints and verify they are state-aware (disabled or restricted after completion).
- Use security linters or custom rules to enforce that high-privilege routes cannot be registered without explicit auth guards.
- Configuration and policy enforcement:
- Apply API gateway or reverse proxy policies that require strong authentication for admin paths.
- Use Infrastructure as Code (IaC) and policy-as-code tools to assert that management endpoints are not publicly exposed.
- Runtime monitoring and logging:
- Log all calls to onboarding and configuration endpoints, including caller IPs, user agents, and any authenticated identity (if present).
- Set alerts for anomalous configuration changes, such as sudden replacement of OAuth client IDs or SMTP hosts.
- Monitor for issuance and use of recovery tokens, especially from unexpected origins or outside planned maintenance windows.
- Periodic security testing:
- Incorporate authenticated and unauthenticated API scanning in CI/CD and staging environments to identify endpoints that respond successfully without authentication where it should be required.
- Perform regular access control reviews focusing on routes that alter authentication, authorization, or secret management behavior.

