Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-30270 PoC — mailcow Path Traversal and Arbitrary Code Execution Vulnerability

Source
Associated Vulnerability
Title: mailcow Path Traversal and Arbitrary Code Execution Vulnerability (CVE-2024-30270)
Description:mailcow: dockerized is an open source groupware/email suite based on docker. A security vulnerability has been identified in mailcow affecting versions prior to 2024-04. This vulnerability is a combination of path traversal and arbitrary code execution, specifically targeting the `rspamd_maps()` function. It allows authenticated admin users to overwrite any file writable by the www-data user by exploiting improper path validation. The exploit chain can lead to the execution of arbitrary commands on the server. Version 2024-04 contains a patch for the issue.
Description
The script exploits Mailcow vulnerabilities via XSS and RCE, emphasizing the need for robust security measures and responsible usage to enhance web application security.
Readme
This script is designed to exploit vulnerabilities in a Mailcow instance using Cross-Site Scripting (XSS) and Remote Code Execution (RCE). The script aims to:

Inject an XSS payload into a Mailcow web interface.

Use the XSS payload to execute unauthorized actions.

Achieve RCE by overwriting a server template and executing commands.

Requirements


1. Python 3: Ensure Python 3 is installed on your machine. You can download it from the official website(https://www.python.org/downloads/).

 2. Requests Library: Install the requests library if it's not already installed. You can do this by running: 

   pip install requests

   3. Target Mailcow Instance: You need access to a Mailcow instance where you have identified a potential XSS vulnerability.

 
 Steps to Use the Script


1. Download the Script: Save the provided script in a Python file, e.g., exploit.py.

2. Run the Script: Execute the script in your terminal or command prompt. The script will prompt you for the target Mailcow instance URL.

 python3 exploit.py

3. Provide Target URL: When prompted, enter the URL of the target Mailcow instance. For example:

   Enter the target Mailcow instance URL (e.g., https://mail.mailcow.example): http://setted-domain/SOGo/so/rex@example.mail.com/Mail/view!/Mail/0/inbox

4. Monitor Output: The script will perform the following actions:

   - Send a malicious email containing the XSS payload.

   - Wait for the victim to open the email.

   - Send an API request to overwrite the rspamd maps.

   - Trigger the execution of the malicious code.

   - Log responses and indicate success or failure of each step.

   Find detailed CVE analysis at www.vsociety.io

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →