Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2024-42009: Stored XSS in Roundcube Webmail message_body()

Published Aug 5, 2024 · Updated 28 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.3Critical · v3.1
EPSS82.9%100th percentile
CISA KEVYesAdded Jun 9, 2025
In the wildActivePer CISA KEV
Vendor
Roundcube
IdentifiersCVE-2024-42009CWE-79 · Improper Neutralization of Input…

CVE-2024-42009 is a stored cross-site scripting vulnerability affecting Roundcube Webmail through version 1.5.7 and the 1.6.x branch through version 1.6.7. Improper processing of previously sanitized HTML in message_body() introduces a desanitization flaw that allows a crafted email to execute attacker-controlled JavaScript in the recipient’s authenticated webmail session. Viewing the malicious message is sufficient to trigger exploitation; no link click or attachment interaction is required. Successful exploitation enables email theft and sending messages as the victim.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

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

Attackers can compromise the confidentiality and integrity of the victim’s mailbox by reading and exfiltrating emails and sending messages under the victim’s identity. Malicious JavaScript can also harvest accessible session tokens, cookies, credentials, and authentication material. Active campaigns have used this vulnerability to deliver browser-based stealers and prepare exploitation of CVE-2025-49113. Server-side code execution and server persistence require an additional vulnerability or capability and are not direct effects of CVE-2024-42009 alone.

Mitigation

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

Until patched, minimize opening or otherwise interacting with messages from unverified sources. Avoiding links and attachments alone is insufficient because viewing the message can trigger exploitation. Monitor affected webmail systems for exploitation and account misuse; patching remains the primary corrective measure.

Remediation

Patch, then assume compromise.

Upgrade Roundcube Webmail 1.5.x to version 1.5.8 or later, or 1.6.x to version 1.6.8 or later. These fixes were released on August 4, 2024. Prefer the latest supported security release; versions 1.5.10 and 1.6.11 additionally address CVE-2025-49113, which has been chained with this vulnerability.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2024-42009This 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.0xbassiouny1337 · Disclosed Feb 11, 2025 · python · browserOperationalCVE-2024-42009-roundcube-xssThis repository is a compact proof-of-concept exploit set for CVE-2024-42009 targeting Roundcube Webmail 1.6.6 and earlier. It contains three functional artifacts: exploit.py, which generates and sends the malicious HTML email over SMTP; listener.py, which runs a simple HTTP server to receive exfiltrated data; and payload.html, which documents the injected HTML structure for manual inspection. The exploit is not part of a larger framework. The main exploit capability is stored XSS-based inbox exfiltration. exploit.py builds a malformed <body> tag whose unquoted attribute context injects a CSS animation trigger and an onanimationstart handler. That handler executes eval(atob(...)) on a base64-encoded JavaScript payload. When the victim opens the email inside Roundcube, the browser executes the script in the authenticated webmail context. The script then loops through message UIDs starting at 1, requesting each message from Roundcube's internal mail view endpoint until it encounters the error string indicating no more messages. All collected message content is then POSTed as JSON to an attacker-controlled HTTP listener. exploit.py uses only Python standard library modules (smtplib, base64, argparse, email.mime.*). It accepts attacker-controlled SMTP host, listener host/port, sender, recipient, and subject values, but the SMTP connection itself is hardcoded to port 25 in the send() function despite README text suggesting a configurable SMTP port. listener.py is a minimal BaseHTTPRequestHandler implementation that accepts OPTIONS and POST, enables permissive CORS headers, writes the received body to stolen_emails.json, and prints the number of recovered emails. payload.html is not executable by itself as delivered; it is a template/example showing the injection structure and intended JavaScript behavior. Overall, this is a real exploit PoC rather than a detector. It operationalizes delivery and collection for a stored XSS attack against vulnerable Roundcube instances, with a basic but functional exfiltration workflow.segunakinsoyinu · Disclosed Jun 17, 2026 · python · html · web · networkOperationalCVE-2024-42009This 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.Bhanunamikaze · Disclosed Feb 13, 2025 · python · network · browserPoCCVE-2024-42009-PoCThis 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.DaniTheHack3r · Disclosed May 24, 2025 · python · network · browserPoCCVE-2024-42009This 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.ZaidArif47 · Disclosed Apr 16, 2026 · markdown · yaml · web · emailPoC
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
FAQ

Frequently asked questions

Is CVE-2024-42009 exploited in the wild?
Yes. As of Oct 27, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 9, 2025.
Is there a public exploit for CVE-2024-42009?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2024-42009, the earliest disclosed Feb 11, 2025.
Is there a patch for CVE-2024-42009?
Upgrade Roundcube Webmail 1.5.x to version 1.5.8 or later, or 1.6.x to version 1.6.8 or later. These fixes were released on August 4, 2024.
What products are affected by CVE-2024-42009?
Roundcube Webmail.
How severe is CVE-2024-42009?
CVE-2024-42009 has a CVSS v3.1 score of 9.3 (Critical) and an EPSS score of 82.9% (100th percentile) as of Oct 27, 2026.
Mallory platform

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, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence18Every report linking this CVE to a named adversary.
Associated malware11Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity45Community discussion across Reddit, Mastodon, and other social sources.