How I Uncovered an Unsubscribe Exploit While Checking My Internsh
The unsubscribe endpoint accepted an email address parameter without verifying that the token was tied to that email, so an attacker could unsubscribe any email address by changing the parameter. This could cause users to miss important communications or updates.
Published on expl0it32.medium.com
It all started innocently enough: I was going through my inbox, checking updates on internship applications I had submitted. As I browsed through the emails, I noticed a common “Unsubscribe” link in several newsletters and notifications.
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 unsubscribe endpoint lacked proper authorization checks, trusting the email parameter without verifying that the token was bound to that email address.
Impact
An attacker could unsubscribe any email address, potentially causing users to miss important communications or updates, leading to privacy concerns and business impact.
What the attacker needed
Access to an unsubscribe URL
The fix
The unsubscribe token should be securely bound to the specific email address and validated server-side, and user authentication or a verification link should be required.
How it was found
- Click the unsubscribe link in an email and intercept the request using Burp Suite.
- Observe that the request contains an email parameter and a token parameter.
- Modify the email parameter to a different email address.
- Forward the modified request to the server.
- Observe that the alternate email address is unsubscribed successfully.
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.
When you click an unsubscribe link, the website often includes a secret code (token) to prove it is really you. Here, the website did not check that the code matched the email address, so anyone could change the email address in the link and unsubscribe someone else without their permission.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.