# Password Reset Vulnerabilities

> Detects insecure password reset implementations including predictable tokens, missing expiration, and host header injection in reset links.

- Skill: `zakirkun/password-reset-vulnerabilities` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/password-reset-vulnerabilities`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/password-reset-vulnerabilities/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/password-reset-vulnerabilities

---


# Password Reset Vulnerabilities

## Overview
Password reset flows contain numerous potential vulnerabilities:
1. **Predictable tokens**: Reset tokens generated with Math.random() instead of CSPRNG
2. **No expiration**: Tokens valid indefinitely, allowing long-lived account takeover
3. **Host header injection**: Reset URL generated from Host header (phishing)
4. **Token reuse**: Token remains valid after use
5. **User enumeration**: Different responses for valid vs invalid email

## Remediation
- Use cryptographically random tokens (32+ bytes)
- Expire tokens after 15-60 minutes and after first use
- Generate reset URL from server configuration, not Host header
- Return the same response regardless of email existence

