Skip to content
OpenAdvisories
Medium · 6.1 CVE-2021-32749 EUVD-2021-19521

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

Published Jul 16, 2021 · Updated Aug 3, 2024 · 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 products

VendorProductAffectedFixed
fail2ban fail2ban <= 0.9.7, >= 0.10.0, <= 0.10.6, >= 0.11.0, <= 0.11.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 fail2ban 0.11.2-2 —
Debian 13 fail2ban 0.11.2-2 —
Debian 12 fail2ban 0.11.2-2 —
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS fail2ban 0.11.1-1ubuntu0.1~esm1 USN-5232-1
Ubuntu Pro 18.04 LTS fail2ban 0.10.2-2ubuntu0.1~esm1 USN-5232-1
Ubuntu Pro 16.04 LTS fail2ban 0.9.3-1ubuntu0.1~esm1 USN-5232-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 14.04 LTS fail2ban 0.8.11-1ubuntu0.1~esm1 USN-5232-1
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP3 fail2ban 0.11.2-bp153.2.3.1 openSUSE-SU-2021:1274-1
SUSE Package Hub 15 SP2 fail2ban 0.11.2-bp153.2.3.1 openSUSE-SU-2021:1274-1
SUSE Package Hub 15 SP1 fail2ban 0.11.2-bp153.2.3.1 openSUSE-SU-2021:1274-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed fail2ban 0.11.2-3.1 openSUSE-SU-2024:10749-1
openSUSE Leap 15.3 fail2ban 0.11.2-bp153.2.3.1 openSUSE-SU-2021:1274-1
openSUSE Leap 15.2 fail2ban 0.11.2-bp153.2.3.1 openSUSE-SU-2021:1274-1
ReleasePackageFixed inAdvisory
Alpine v3.24 fail2ban 0.11.2-r2 —
Alpine v3.23 fail2ban 0.11.2-r2 —
Alpine v3.22 fail2ban 0.11.2-r2 —
Alpine v3.21 fail2ban 0.11.2-r2 —
Alpine v3.20 fail2ban 0.11.2-r2 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 fail2ban 0.11.2-r2 —
Alpine v3.18 fail2ban 0.11.2-r2 —
Alpine v3.17 fail2ban 0.11.2-r2 —
Alpine v3.16 fail2ban 0.11.2-r2 —
Alpine v3.15 fail2ban 0.11.2-r1 —

Advisories 3

References