Skip to content
XSS Write-up Intermediate

How I built an XSS worm on atmail

An XSS vulnerability in atmail webmail allowed an attacker to inject a script into emails, which could then steal contacts and send self-propagating emails. The attacker could build a worm that spreads through a victim's contact list.

Jake Miller Follow

Published on bishopfox.com

Atmail is a popular provider for cloud-based and on-premises email hosting. It is used by companies, hosting providers, and ISPs including DreamHost, LegalShield (US), m:tel (Bosnia), iiNet, and Optus (Australia).

Jake Miller, on bishopfox.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

Impact

The worm could spread through contact lists, enabling spam, malware delivery, or phishing with the trust of a known sender.

What the attacker needed

Victim uses atmail webmail; victim opens the malicious email; victim clicks 'Display Images'

The fix

The vulnerability was fixed in atmail version 7.8.0.2.

How it was found

  1. Send an email with an <img> tag containing every valid attribute to see which are allowed.
  2. Observe that single quotes are converted to double quotes and onerror is removed.
  3. Craft a payload using two <img> tags with mixed quotes to bypass the filter.
  4. Host the worm JavaScript externally and include it via a script tag in the onerror handler.
  5. The worm extracts contacts, grabs a CSRF token, and sends emails to each contact.

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.

Cross-site scripting (XSS) is a flaw where a website shows user content without properly cleaning it, so attackers can sneak in code that runs in other users' browsers. Here, emails could carry hidden code that, when opened, would automatically send copies to the victim's contacts.

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 Jake Miller

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.