Phish and Fetch: Turning Weak Email Validations Into Full System Access
A beta API endpoint for sending emails accepted an admin email address without validation, triggering a password reset link. The reset token was leaked to an attacker-controlled server, allowing the attacker to reset the admin password and access sensitive data including backups and secrets.
Free link 🎈
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the email-sending endpoint lacked validation to ensure the email address belongs to the requesting user, and the reset token was exposed in a redirect URL that could be intercepted.
Impact
An attacker could take over an admin account and access sensitive data including user lists, transaction logs, and backups containing credentials and secrets.
What the attacker needed
Access to the beta API endpoint; ability to host a server to capture tokens
The fix
The endpoint should validate that the email belongs to an existing user and implement CAPTCHA or token verification for reset flows, and tokens should be rotated and short-lived.
How it was found
- Discover the send-email endpoint on a beta API.
- Send a request with the admin's email address to trigger a password reset.
- Set up a tracking script to capture the token from the reset link.
- Use the captured token to reset the admin password and log in.
- Access admin APIs to retrieve user data, payment logs, and a backup link.
- Download backups containing database credentials, JWT secrets, and AWS keys.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A password reset link is sent when you forget your password. If the system doesn't check that the email belongs to the person requesting the reset, an attacker can request a reset for someone else's account. Here, the attacker tricked the system into sending the reset link to a server they controlled, then used the token in the link to take over the admin account.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.