Possible RCE vulnerability in mailing action using mailutils (mail-whois)
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-78.
Summary
fail2ban is a daemon to ban hosts that cause multiple authentication errors. In versions 0.9.7 and prior, 0.10.0 through 0.10.6, and 0.11.0 through 0.11.2, there is a vulnerability that leads to possible remote code execution in the mailing action mail-whois. Command `mail` from mailutils package used in mail actions like `mail-whois` can execute command if unescaped sequences (`\n~`) are available in "foreign" input (for instance in whois output). To exploit the vulnerability, an attacker would need to insert malicious characters into the response sent by the whois server, either via a MITM attack or by taking over a whois server. The issue is patched in versions 0.10.7 and 0.11.3. As a workaround, one may avoid the usage of action `mail-whois` or patch the vulnerability manually.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fail2ban | fail2ban | up to 0.9.7; 0.10.0 – 0.10.6; 0.11.0 – 0.11.2 | — | No fix listed | CNA |
- fail2ban Vendorfail2ban Affected up to 0.9.7; 0.10.0 – 0.10.6; 0.11.0 – 0.11.2 Fixed in — No fix listed CNA
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:fail2ban:fail2ban:*:*:*:*:*:*:*:* | up to 0.9.7; 0.10.0 to before 0.10.7; 0.11.0 to before 0.11.3 | Vulnerable | fail2ban |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
- cpe:2.3:a:fail2ban:fail2ban:*:*:*:*:*:*:*:* Versions up to 0.9.7; 0.10.0 to before 0.10.7; 0.11.0 to before 0.11.3 Vulnerable ·fail2ban
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32749
References
Patch 2
More Fail2ban vulnerabilities
- TI-2007-04181 fail2ban 0.8 and earlier does not properly parse sshd log files, which allows remote… CVSS 2.0MEDIUM 6.8
- TI-2012-04743 server/action.py in Fail2ban before 0.8.8 does not properly handle the content of the… CVSS 2.0HIGH 7.5
- TI-2013-05868 config/filter.d/cyrus-imap.conf in the cyrus-imap filter in Fail2ban before 0.8.11 allows… CVSS 2.0MEDIUM 5.0
- TI-2013-05867 config/filter.d/postfix.conf in the postfix filter in Fail2ban before 0.8.11 allows… CVSS 2.0MEDIUM 5.0
- TI-2013-01945 The apache-auth.conf, apache-nohome.conf, apache-noscript.conf, and apache-overflows.conf… CVSS 2.0MEDIUM 5.0
- TI-2006-06066 fail2ban 0.7.4 and earlier does not properly parse sshd log files, which allows remote… CVSS 2.0MEDIUM 5.0
Sources
- CVE-2021-32749 · CVE Program
- CVE-2021-32749 · NVD
- FIRST EPSS
- CVE-2021-32749 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences