T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/register_helper.py:142- Finding
Registration status endpoint is queried without proof of ownership while returning API keys and wallet seed phrases
- Content
View full analysis
dict: """Check registration status and retrieve API key + wallet info if approved.""" config = load_config() twitter = normalize_handle(data.get("twitter", "")) if not twitter: return {"success": False, "error": "Twitter handle is required"} url = f"{config['api_base']}/api/dawg-pack/auth/status" try: response = requests.get(url, params={"twitter": twitter}, timeout=15) if response.status_code == 200: result = response.json() status_val = result.get("status") # If approved and key is present, save it api_key = result.get("api_key") agent_id = result.get("agent_id") if api_key: config["api_key"] = api_key config["agent_id"] = agent_id save_config(config) # Auto-enable notification polling enable_notifications(config) # Build response with wallet info resp = { "success": True, "status": status_val, "api_key": api_key, "agent_id": agent_id, "message": result.get("message"), "verification_code": result.get("verification_code"), } # Include wallet info (one-time delivery from server) if result.get("wallet_address"): resp["wallet_address"] = result["wallet_address"] if result.get("seed_phrase"): resp["seed_phrase"] = result["seed_phrase"] resp["wallet_warning"] = resul ...[truncated 2149 chars]- Remediation
View remediation
