# Critical full compromise of jarvis-new.urbanclap.com via weak session signing

Hardcoded Flask secret key on jarvis-new.urbanclap.com let attacker forge Redash session cookies and password-reset tokens to log in as any user, including admin.

- Payout: $1,500
- Severity: critical
- Program: Urban Company
- Found by: ian
- Disclosed: 2022-01-30
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1380121
- Library page: https://bugbountylibrary.com/r/h1%3A1380121
- Tags: area:web domain:web impact:ato impact:data-leak impact:privesc kind:bounty platform:hackerone sev:critical tech:python technique:default-creds technique:source-review vuln:account-takeover vuln:auth-bypass vuln:secrets-leak

**Target:** Redash instance at jarvis-new.urbanclap.com (Flask session signing)
**Root cause:** REDASH_COOKIE_SECRET and REDASH_SECRET_KEY were set to a weak/static value, so Flask/itsdangerous-signed sessions and reset tokens could be forged by anyone knowing the secret.
**Steps:**
1. Obtain the weak Flask secret key used by the Redash instance.
2. Use itsdangerous URLSafeTimedSerializer with that secret to sign a reset token for target user_id: `URLSafeTimedSerializer("<secret>").dumps(str("1"))`.
3. Visit `https://jarvis-new.urbanclap.com/reset/<forged_token>` and set a new password for user ID 1.
4. Log in as that user; repeat for any user_id to impersonate admins.
**How found:** Recognized the target runs Redash (Flask), hypothesized the session/reset signing secret was weak or default, and confirmed by forging a reset token with itsdangerous.
**Exploitation:** Attacker forges a password-reset token for arbitrary user_id using the known secret, resets the victim's password via the /reset/ endpoint, and logs in with full admin permissions, gaining access to all connected databases.
**Escalation:** Forging user_id=1 yields admin; instance is connected to all databases, escalating to mass PII exposure.
**Insight:** When a target runs a known Flask app (Redash, Superset, etc.), try forging itsdangerous-signed session and password-reset tokens with default/weak secrets before attacking the app logic itself.

## Proof of concept (copied exactly from the original report)

**Python forging Redash password reset token for user ID 1**

```
>>> from itsdangerous import URLSafeTimedSerializer, SignatureExpired, BadSignature
>>> serializer = URLSafeTimedSerializer("███")
>>> serializer.dumps(str("1"))
'███'
```

