Skip to main content
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

Stored XSS in Roundcube Webmail message_body()

IdentifiersCVE-2024-42009CWE-79· Improper Neutralization of Input…

CVE-2024-42009 is a stored cross-site scripting vulnerability in Roundcube Webmail affecting versions through 1.5.7 and 1.6.x through 1.6.7. The issue is triggered by a crafted HTML email and is attributed to a desanitization flaw in message_body() in program/actions/mail/show.php; supporting context also describes improper attribute sanitization in the html4inline() processing path. Although some early references labeled it reflected XSS, the provided material consistently indicates stored XSS: the malicious payload is embedded in an email, persists as message content, and executes when the victim opens the message in the Roundcube web interface. Successful exploitation enables attacker-supplied JavaScript to run in the victim’s Roundcube session context, with reported abuse including credential theft, mailbox access, and email exfiltration/send actions.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows arbitrary JavaScript execution in the victim’s browser within the Roundcube webmail origin when a weaponized email is opened. The provided reporting states this can be used to steal credentials, access session data, exfiltrate email contents, download address books, and send emails as the victim. Multiple sources in the content note real-world exploitation by threat actors, including UNC1151, for credential theft and follow-on mailbox compromise. Because execution occurs in the authenticated webmail context, the attacker can abuse the victim’s active session to perform actions available to that user.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by minimizing user interaction with untrusted emails, especially HTML messages from unverified senders, because exploitation is triggered when the victim opens a crafted message. Monitor Roundcube instances and associated web logs for indicators of exploitation and suspicious outbound requests from user browsers, review received emails for known IOCs, and reset credentials for potentially affected accounts. The provided campaign reporting also recommends unregistering malicious Service Workers in affected browsers where compromise is suspected. These measures are temporary risk reductions only; the content explicitly indicates that applying the update is the effective protection.

Remediation

Patch, then assume compromise.

Upgrade Roundcube Webmail to a fixed release. The provided content states affected versions are 1.5.x prior to 1.5.8 and 1.6.x prior to 1.6.8, with fixes released in Roundcube 1.5.8 LTS and 1.6.8. Later guidance also notes that updating to 1.5.10+ or 1.6.11+ mitigates both CVE-2024-42009 and newer Roundcube issues. Organizations should patch exposed Roundcube instances without delay, review vendor security bulletins, and verify that bundled/control-panel deployments receive the corrected Roundcube version from the platform vendor where applicable.
PUBLIC EXPLOITS

Exploits

4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 4 / 5 TOTALView more in app
CVE-2024-42009MaturityPoCVerified exploit

This repository is a minimal Docker-based proof-of-concept for CVE-2024-42009, a stored XSS vulnerability in Roundcube Webmail. It contains only two files: a README describing exploitation steps and a docker-compose.yml that provisions a local lab with docker-mailserver and a vulnerable Roundcube 1.6.7 instance. There is no standalone exploit script; the exploit is operationalized through documented manual steps using swaks to send a crafted HTML email. The main exploit capability is stored cross-site scripting via malicious HTML email content. The payload abuses Roundcube's HTML sanitization and later attribute reprocessing to create attribute-boundary confusion and reintroduce an event handler such as onanimationstart=alert(1). When the victim logs into Roundcube and opens the email, arbitrary JavaScript executes in the browser context of the Roundcube session. The demonstrated payload is a simple alert, so this is best classified as a PoC rather than a weaponized exploit. Repository structure and purpose: README.md explains the vulnerability, affected versions, setup, user creation, access details, exploitation steps, and mitigation. docker-compose.yml defines two services: a mailserver container exposing SMTP/IMAP-related ports and a Roundcube container exposing HTTP on localhost:8080. The compose file also defines persistent volumes and Roundcube mail settings pointing to the mailserver service. Overall, the repository's purpose is to let a researcher quickly reproduce and observe the stored XSS issue in a controlled local environment.

ZaidArif47Disclosed Apr 16, 2026markdownyamlwebemail
CVE-2024-42009-PoCMaturityPoCVerified exploit

This repository is a proof-of-concept exploit for CVE-2024-42009, a stored XSS vulnerability in Roundcube Webmail (versions 1.5.7, 1.6.x through 1.6.7). The exploit consists of a Python script ('exploit.py') that crafts and sends a malicious email to a target Roundcube instance via its contact form endpoint. The email contains a specially crafted HTML body with a base64-encoded JavaScript payload that leverages a desanitization issue in Roundcube's HTML parsing. When a victim opens the email, the payload executes in their browser, iterates through their inbox, and exfiltrates email contents to an attacker-controlled HTTP server. The script also implements a local HTTP server to receive and display the exfiltrated emails. The repository includes a README with detailed usage instructions, a requirements.txt for dependencies, and a .gitignore. The exploit is a functional PoC and does not include advanced stealth or weaponization features.

DaniTheHack3rDisclosed May 24, 2025pythonnetworkbrowser
CVE-2024-42009MaturityPoCVerified exploit

This repository is a Proof of Concept (PoC) exploit for CVE-2024-42009, targeting a cross-site scripting (XSS) vulnerability in an unspecified webmail application. The repository contains three files: a LICENSE, a README.md with detailed usage instructions, and the main exploit script (exploit.py). The exploit works by starting an HTTP listener on the attacker's machine to receive exfiltrated email data. It then sends crafted emails to the target webmail application, injecting a malicious HTML payload. When a victim opens the email, the XSS payload executes in their browser, fetches the content of their email, base64-encodes it, and sends it to the attacker's listener via an HTTP GET request. The exploit.py script automates both the listener and the payload injection process. The code is written in Python and uses the requests and BeautifulSoup libraries. The exploit is a functional PoC and does not include weaponized or highly automated features beyond the basic exfiltration workflow.

BhanunamikazeDisclosed Feb 13, 2025pythonnetworkbrowser
CVE-2024-42009MaturityPoCVerified exploit

This repository contains a Python-based exploit for CVE-2024-42009, a stored XSS vulnerability in Roundcube Webmail 1.6.7. The main file, exploit.py, serves two purposes: it runs an HTTP listener to capture exfiltrated email content and sends a malicious XSS payload to the target's contact form. The payload, when triggered in a victim's browser, fetches the victim's email content and sends it (base64-encoded) to the attacker's listener. The exploit is operational and requires the attacker to configure the target URL and their own listener IP/port. The README provides clear usage instructions and context about the vulnerability. No fake or detection-only scripts are present; the code is a working exploit. The only code file is exploit.py, written in Python, and the repository is small and focused.

0xbassiouny1337Disclosed Feb 11, 2025pythonbrowser
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
RoundcubeWebmailapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence7

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity20

Community discussion across Reddit, Mastodon, and other social sources.