[Security] Privilege escalation via malicious RTF attachments
13 views
Skip to first unread message
Gareth Rees
unread,
Apr 7, 2026, 6:22:38 AM (8 days ago) Apr 7
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to alavet...@googlegroups.com
We’ve discovered and patched an issue where user accounts can potentially be compromised and given admin roles via malicious RTF attachments.
We’ve released fixes for most known operational Alavetelis.
Summary and Impact: ===================
The "View as HTML" feature for RTF email attachments renders the output of unrtf --html directly to the browser via html_safe with no HTML sanitization. An attacker can craft an RTF file with a malicious font name in the font table that injects arbitrary HTML/JavaScript when the <font face="..."> tag is generated. The script executes automatically on page load – no user interaction beyond clicking "View as HTML" is needed.
This is significant as an attacker can craft the attack in such a way as to gain admin privileges by stealing an existing admin’s CSRF token.
While request email addresses are not generally public and older requests get response permissions restricted to prevent incoming responses, request email addresses frequently get leaked in a variety of ways to be concerning enough that there is a possibility that they could be exploited in this way. It may also be possible for an attacker to send a request that ends up in the holding pen and achieve the same effect.
The attacker can report the malicious response via the "Report" button to maximise the chances that an admin views it.
Fix: ====
The fix is to lib/attachment_to_html/adapters/rtf.rb. The updated code sanitises the html produced by unrtf before further processing.
We’ve released fixes for most known operational Alavetelis. These are listed below.
I also attach a diff that you can apply to your Alaveteli if you are unable to upgrade immediately.
Releases prior to these do not have loofah available for sanitisation. Please contact us if you need assistance in creating an alternative patch. We strongly recommend upgrading to more recent versions of Alaveteli.