Skip to content
XSS Write-up Advanced

Exploit Disclosure: Turning Thunderbird into a Decryption Oracle

Thunderbird's compose window allowed JavaScript execution via a meta refresh tag and an object tag's onerror handler, bypassing scripting protections. An attacker with intercepted PGP ciphertext could send a crafted email that, when replied to or forwarded, automatically decrypted the ciphertext and leaked the plaintext back to the attacker.

Sarah Jamie Lewis Follow

Published on pseudorandom.resistant.tech

I recently disclosed several security and privacy vulnerabilities in Thunderbird. At worst these vulnerabilities can by exploited by an adversary with access to a collection of intercepted encrypted messages to trick Thunderbird into decrypting any given message and sending the resulting plaintext back to the…

Sarah Jamie Lewis (@SarahJamieLewis), on pseudorandom.resistant.tech

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 a combination of insufficient script blocking in the compose window and the automatic decryption of PGP messages without isolating the plaintext from script access.

Impact

An attacker with intercepted encrypted messages could trick Thunderbird into decrypting them and leaking the plaintext, even with remote content disabled; the attack required the victim to reply or forward the message.

What the attacker needed

Victim uses Thunderbird with a private key; attacker has intercepted ciphertext; victim replies or forwards the email

The fix

Thunderbird was fixed in versions 102.2.1 and 91.13.1 to block the script execution and remote content loading.

How it was found

  1. Craft an email with a multipart/mixed body containing both PGP ciphertext and HTML with a meta refresh and an object tag with an onerror handler.
  2. Send the email to the victim; when the victim opens it in the reply/forward window, Thunderbird decrypts the ciphertext and executes the JavaScript.
  3. The JavaScript reads the decrypted plaintext from the compose window and inserts an image tag pointing to an attacker-controlled server with the plaintext in the URL.
  4. Thunderbird loads the image, sending the plaintext to the attacker.

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.

Thunderbird is an email program that can decrypt PGP-encrypted messages. Normally it blocks scripts in emails for safety, but a bug let an attacker run a script when the victim replied to a specially crafted email. That script could read the decrypted message and send it to the attacker, so the attacker could read secret emails they had intercepted.

What is XSS?

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

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.