Hoppscotch Security Testing: Default Credentials, API Key, Database, and JWT Secret

Hoppscotch is a widely deployed self-hosted open-source API testing platform used as a team alternative to Postman — it stores all API collections, request configurations, and critically, workspace environment variables that contain the API keys and secrets teams use for testing their own services. Key assessment areas: JWT_SECRET signs all authentication tokens enabling session forgery; workspace environments accumulate API keys, database connection strings, OAuth client secrets, and bearer tokens; the PostgreSQL database stores all team-shared environment variable values; and the admin API enables full user and workspace enumeration. This guide covers systematic Hoppscotch security assessment.

Table of Contents

  1. Authentication and Admin API Testing
  2. Workspace Environment Variable API Key Extraction
  3. JWT Secret and Database Credential Extraction
  4. Hoppscotch Security Hardening

Authentication and Admin API Testing

# Hoppscotch — authentication and admin API testing
HOPPSCOTCH_URL="https://hoppscotch.example.com"

# Hoppscotch uses OAuth2/magic link authentication + JWT tokens
# Admin API is available at /v1/admin/*

# Test admin API access (requires admin user JWT)
ADMIN_JWT="your-admin-jwt-token"
curl -s "${HOPPSCOTCH_URL}/v1/admin/users?take=100&skip=0" \
  -H "Authorization: Bearer ${ADMIN_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
users = d.get('users',[])
total = d.get('totalUserCount',len(users))
print(f'Users: {total} total')
for u in users[:10]:
    print(f'  [{u.get(\"uid\",\"\")[:8]}] {u.get(\"email\")} admin={u.get(\"isAdmin\")} created={str(u.get(\"createdOn\",\"\"))[:10]}')
" 2>/dev/null

# List all teams/workspaces
curl -s "${HOPPSCOTCH_URL}/v1/admin/teams?take=50&skip=0" \
  -H "Authorization: Bearer ${ADMIN_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
teams = d.get('teams',[])
print(f'Teams: {len(teams)}')
for t in teams[:10]:
    print(f'  [{t.get(\"id\",\"\")[:8]}] {t.get(\"name\")} members={t.get(\"membersCount\")}')
" 2>/dev/null

# Get personal access tokens for all users
curl -s "${HOPPSCOTCH_URL}/v1/admin/users/{user-id}" \
  -H "Authorization: Bearer ${ADMIN_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
print(f'User: {d.get(\"email\")} admin={d.get(\"isAdmin\")}')
# Personal access tokens allow API access
" 2>/dev/null

Workspace Environment Variable API Key Extraction

# Hoppscotch — workspace environment variable API key extraction
# This is the CRITICAL risk: team environments store API keys for all tested services

HOPPSCOTCH_URL="https://hoppscotch.example.com"
USER_JWT="your-user-jwt-token"

# Get all personal environments (user's own env variables)
curl -s "${HOPPSCOTCH_URL}/v1/user/environments" \
  -H "Authorization: Bearer ${USER_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
envs = d if isinstance(d,list) else d.get('environments',[])
print(f'Personal environments: {len(envs)}')
for env in envs:
    print(f'  Env: {env.get(\"name\")}')
    variables = env.get('variables',[])
    for v in variables:
        key = v.get('key','')
        val = v.get('value','')
        # Secret values often hidden by default but visible to owner
        if any(s in key.upper() for s in ['KEY','SECRET','TOKEN','PASS','AUTH','BEARER','CRED']):
            print(f'    SECRET: {key}={str(val)[:60]}')
        else:
            print(f'    {key}={str(val)[:40]}')
" 2>/dev/null

# Get team environments (shared across team members)
TEAM_ID="your-team-id"
curl -s "${HOPPSCOTCH_URL}/v1/teams/${TEAM_ID}/environments" \
  -H "Authorization: Bearer ${USER_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
envs = d if isinstance(d,list) else d.get('environments',[])
print(f'Team environments: {len(envs)}')
for env in envs:
    print(f'  Team Env: {env.get(\"name\")}')
    variables = env.get('variables',[])
    for v in variables:
        key = v.get('key','')
        val = v.get('value','')
        print(f'    {key}={str(val)[:60]}')
" 2>/dev/null
# Team environments are shared — any team member can see all values
# Common stored secrets: API keys, database URLs, JWT secrets, OAuth credentials

# List team collections (API request library)
curl -s "${HOPPSCOTCH_URL}/v1/teams/${TEAM_ID}/collections" \
  -H "Authorization: Bearer ${USER_JWT}" 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
colls = d if isinstance(d,list) else d.get('collections',[])
print(f'Team collections: {len(colls)}')
for c in colls[:10]:
    print(f'  {c.get(\"title\")} requests={c.get(\"requestCount\",0)}')
" 2>/dev/null

JWT Secret and Database Credential Extraction

# Hoppscotch JWT secret and database credential extraction

# Docker Compose / environment variables
docker inspect hoppscotch-backend 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin)
for c in d:
    for e in c.get('Config',{}).get('Env',[]):
        if any(k in e for k in ['JWT','SECRET','DATABASE','SMTP','GOOGLE','GITHUB','MICROSOFT','OAUTH']):
            print(e)
" 2>/dev/null
# JWT_SECRET — signs all authentication tokens
# DATABASE_URL — PostgreSQL connection string with credentials
# GOOGLE_CLIENT_ID/SECRET, GITHUB_CLIENT_ID/SECRET — OAuth2 provider secrets
# SMTP_PASSWORD — email relay credentials
# VITE_BACKEND_GQL_URL — GraphQL API endpoint

# PostgreSQL — all Hoppscotch data
DB_URL="postgresql://hoppscotch:PASSWORD@localhost/hoppscotch"

# Personal access tokens (API keys for programmatic access)
psql "$DB_URL" 2>/dev/null << 'EOF'
SELECT pat.id, pat.label,
       pat.token,
       pat.created_on, pat.updated_on,
       u.email as user_email
FROM "PersonalAccessToken" pat
JOIN "User" u ON pat."userUid" = u.uid
ORDER BY pat.created_on DESC
LIMIT 10;
EOF
-- token: plaintext personal access token — full API access for the user

-- All environment variables (THE KEY PRIZE)
psql "$DB_URL" 2>/dev/null << 'EOF'
SELECT e.id, e.name,
       e.variables::text as variables_json,
       u.email as owner
FROM "UserEnvironment" e
JOIN "User" u ON e."userUid" = u.uid
ORDER BY e.id DESC
LIMIT 20;
EOF
-- variables: JSONB array of {key, value} pairs — all API keys and secrets

-- Team environments (shared secrets)
psql "$DB_URL" 2>/dev/null << 'EOF'
SELECT te.id, te.name,
       te.variables::text as variables_json,
       t.name as team_name
FROM "TeamEnvironment" te
JOIN "Team" t ON te."teamID" = t.id
ORDER BY te.id DESC
LIMIT 20;
EOF
-- Team environments expose API secrets to ALL team members

Hoppscotch Security Hardening

Hoppscotch Security Hardening Checklist:
Security TestMethodRisk
JWT_SECRET extraction and session token forgeryRead .env JWT_SECRET — forge valid JWT tokens for any user including admin; bypasses OAuth2 authentication; full access to all workspaces, collections, and environment variablesCritical
PostgreSQL TeamEnvironment API credential extractionSELECT variables FROM "TeamEnvironment" — JSONB environment variable values including API keys, database URLs, OAuth tokens for all services tested by the team; concentrated credential exfiltrationCritical
PostgreSQL PersonalAccessToken plaintext extractionSELECT token FROM "PersonalAccessToken" — plaintext API tokens for programmatic Hoppscotch access; full access to the user's collections, environments, and requestsHigh
Admin API user and team workspace enumerationGET /v1/admin/users and /v1/admin/teams — full inventory of all users and teams; enables targeted credential extraction for high-value usersHigh
OAuth2 client secret extraction for provider impersonationRead Docker env GOOGLE_CLIENT_SECRET / GITHUB_CLIENT_SECRET — OAuth2 client secrets; enables impersonating the Hoppscotch application to OAuth2 providers; intercept authorization flowsHigh

Automate Hoppscotch Security Testing

Ironimo tests Hoppscotch deployments for JWT_SECRET session token forgery, PostgreSQL TeamEnvironment API credential bulk extraction, PersonalAccessToken plaintext enumeration, admin API user and workspace enumeration, OAuth2 client secret extraction for provider impersonation, team environment variable API key inventory, Docker JWT_SECRET/DATABASE_URL exposure, SMTP_PASSWORD mailer credential extraction, collection request header authorization token scanning, and admin panel unauthorized access testing.

Start free scan