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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | fail2ban | 0.11.2-2 | — |
| Debian 13 | fail2ban | 0.11.2-2 | — |
| Debian 12 | fail2ban | 0.11.2-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | fail2ban | 0.8.11-1ubuntu0.1~esm1 | USN-5232-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
- USN-5232-1 fail2ban vulnerability Ubuntu Security Notices (USN) · Jun 29, 2026
- openSUSE-SU-2024:10749-1 fail2ban-0.11.2-3.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:1274-1 Security update for fail2ban SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://github.com/fail2ban/fail2ban/security/advisories/GHSA-m985-3f3v-cwmm
- https://github.com/fail2ban/fail2ban/commit/2ed414ed09b3bb4c478abc9366a1ff22024a33c9
- https://github.com/fail2ban/fail2ban/commit/410a6ce5c80dd981c22752da034f2529b5eee844
- FEDORA-2021-0ab8f6a19a vendor-advisory
- FEDORA-2021-a18b79d182 vendor-advisory
- GLSA-202310-13 vendor-advisory