CVEfocus › CVE database › CVE-2021-32749

CVE-2021-32749Possible RCE vulnerability in mailing action using mailutils (mail-whois)

CVSS 6.1 MediumEPSS 3.4% (higher than 90% of CVEs)Published 2021-07-16Updated 2024-08-03Assigner: GitHub_M

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.

CWE-78

What to do

Fixed builds are available from Alpine, Debian: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

13Fixed
4Fix pending
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04fail2banNot affected
vulnerable_code_not_present
Ubuntu 22.04fail2banNot affected
vulnerable_code_not_present
Ubuntu 20.04fail2banFix pending0.11.1-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-32749
Ubuntu 18.04fail2banFix pending0.10.2-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-32749
Ubuntu 16.04fail2banFix pending0.9.3-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-32749
Ubuntu 14.04fail2banFix pending0.8.11-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-32749
Debian 14fail2banFixed0.11.2-2DEBIAN-CVE-2021-32749
Debian 13fail2banFixed0.11.2-2DEBIAN-CVE-2021-32749
Debian 12fail2banFixed0.11.2-2DEBIAN-CVE-2021-32749
Alpine Linux 3.24fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.23fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.22fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.21fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.20fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.19fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.18fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.17fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.16fail2banFixed0.11.2-r2ALPINE-CVE-2021-32749
Alpine Linux 3.15fail2banFixed0.11.2-r1ALPINE-CVE-2021-32749

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.