Bug 1188610 - (CVE-2021-32749) VUL-0: CVE-2021-32749: fail2ban: Command injection via mail comand
(CVE-2021-32749)
VUL-0: CVE-2021-32749: fail2ban: Command injection via mail comand
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Security
Leap 15.2
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Johannes Weberhofer
Security Team bot
https://smash.suse.de/issue/304472/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-22 11:01 UTC by Alexander Bergmann
Modified: 2021-09-16 15:42 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bergmann 2021-07-22 11:01:51 UTC
rh#1983222

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.

https://github.com/fail2ban/fail2ban/commit/410a6ce5c80dd981c22752da034f2529b5eee844
https://github.com/fail2ban/fail2ban/commit/2ed414ed09b3bb4c478abc9366a1ff22024a33c9
https://github.com/fail2ban/fail2ban/security/advisories/GHSA-m985-3f3v-cwmm

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1983222
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-32749
https://github.com/fail2ban/fail2ban/commit/410a6ce5c80dd981c22752da034f2529b5eee844
https://github.com/fail2ban/fail2ban/security/advisories/GHSA-m985-3f3v-cwmm
http://www.cvedetails.com/cve/CVE-2021-32749/
https://github.com/fail2ban/fail2ban/commit/2ed414ed09b3bb4c478abc9366a1ff22024a33c9
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32749
Comment 1 Andreas Stieger 2021-08-06 17:13:49 UTC
Marcus, Jan? Package needs a bugowner.
Comment 2 Johannes Weberhofer 2021-08-18 14:35:33 UTC
Andreas you could assign me.
Comment 3 OBSbugzilla Bot 2021-08-24 15:00:21 UTC
This is an autogenerated message for OBS integration:
This bug (1188610) was mentioned in
https://build.opensuse.org/request/show/914050 15.2+Backports:SLE-15-SP1+Backports:SLE-15-SP2+Backports:SLE-15-SP3 / fail2ban
Comment 4 Swamp Workflow Management 2021-09-16 13:29:24 UTC
# maintenance_jira_update_notice
openSUSE-SU-2021:1274-1: An update that solves one vulnerability and has three fixes is now available.

Category: security (important)
Bug References: 1145181,1146856,1180738,1188610
CVE References: CVE-2021-32749
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    fail2ban-0.11.2-lp152.3.3.1
openSUSE Backports SLE-15-SP3 (src):    fail2ban-0.11.2-bp153.2.3.1
openSUSE Backports SLE-15-SP2 (src):    fail2ban-0.11.2-bp152.4.3.1
openSUSE Backports SLE-15-SP1 (src):    fail2ban-0.11.2-bp151.3.3.1
Comment 5 Johannes Weberhofer 2021-09-16 15:42:25 UTC
Fixed and created MR