6.1medium
Possible RCE vulnerability in mailing action using mailutils (mail-whois)
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 3.43% (higher than 89% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| fail2ban fail2ban | <= 0.9.7, >= 0.10.0, <= 0.10.6, >= 0.11.0, <= 0.11.2, up to 0.9.7, from 0.10.0 before 0.10.7, from 0.11.0 before 0.11.3 | CVE List, NVD |
| fedoraproject fedora | 34, 35 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
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.
NVD (es)
fail2ban es un demonio para banear hosts que causan múltiples errores de autenticación. En versiones 0.9.7 y anteriores, versiones 0.10.0 hasta 0.10.6, y versiones 0.11.0 hasta 0.11.2, se presenta una vulnerabilidad que conlleva a una posible ejecución de código remota en la acción de correo mail-whois. El comando "mail" del paquete mailutils usado en acciones de correo como "mail-whois" puede ejecutar comando si se presentan secuencias sin mayúsculas ("\n~") en la entrada "foreign" (por ejemplo, en la salida de whois). Para explotar la vulnerabilidad, un atacante necesitaría insertar caracteres maliciosos en la respuesta enviada por el servidor whois, ya sea por medio de un ataque MITM o al tomar el control de un servidor whois. El problema está parcheado en las versiones 0.10.7 y 0.11.3. Como solución, se puede evitar el uso de la acción "mail-whois" o parchear la vulnerabilidad manualmente
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32749 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-32749 changed 2026-06-17 | Public domain |