Skip to content
XSS Write-up Beginner

Story Of Unexpected Bugs

An unsubscribe link carried the recipient's email address as a hex-encoded parameter, and the server trusted it without checking ownership. An attacker could change the value to unsubscribe any other address, and by supplying a script tag instead of an address they could get script reflected back and executed.

Neh Patel Follow

Published on medium.com

It was about 2 or 2:30 am at midnight and I was reading some books related to hacking and I was just going to bed at that time I decided to check the email.

Neh Patel, on medium.com

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 endpoint trusted a client-supplied, encoded email parameter for both the unsubscribe action and the page output, with no ownership check and no output encoding.

Impact

An attacker could unsubscribe arbitrary users from the mailing list and could execute script in the context of the site for a crafted link.

What the attacker needed

A marketing email with an unsubscribe link; victim opens a crafted link

How it was found

  1. Open the unsubscribe link from a marketing email and note the email parameter.
  2. Decode the parameter value, which is the email address in hexadecimal.
  3. Replace it with another address, hex-encoded in capitals, to unsubscribe that person.
  4. Replace it with a script tag, hex-encoded, to trigger script execution.

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 website sometimes puts information in a link, like an email address, so it knows who you are. Here the site believed whatever the link said, so changing the address let someone act on another person's account. The same spot also echoed the value back into the page, so a script could run in the visitor's browser.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Neh Patel

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.