cve.bz

CVE-2021-32749 Code Injection

8.1 highExploit referenceEPSS 3.4%Fix available

High (8.1). EPSS 3.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.4% (unchanged from 3.4% a week ago; 3.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-32749 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-32749?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-32749?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-32749 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
fail2ban:fail2banthrough 0.9.7
fail2ban:fail2banfrom 0.10.0 before 0.10.7
fail2ban:fail2banfrom 0.11.0 before 0.11.3
fedoraproject:fedora34
fedoraproject:fedora35

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14fail2ban0.11.2-2DEBIAN-CVE-2021-32749
UbuntuPro:14.04:LTSfail2ban0.8.11-1ubuntu0.1~esm1UBUNTU-CVE-2021-32749 USN-5232-1
UbuntuPro:16.04:LTSfail2ban0.9.3-1ubuntu0.1~esm1UBUNTU-CVE-2021-32749 USN-5232-1
UbuntuPro:18.04:LTSfail2ban0.10.2-2ubuntu0.1~esm1UBUNTU-CVE-2021-32749 USN-5232-1
UbuntuPro:20.04:LTSfail2ban0.11.1-1ubuntu0.1~esm1UBUNTU-CVE-2021-32749 USN-5232-1
SUSEPackage Hub 15 SP1, Package Hub 15 SP2, Package Hub 15 SP3fail2ban0.11.2-bp153.2.3.1openSUSE-SU-2021:1274-1
openSUSELeap 15.2, Leap 15.3fail2ban0.11.2-bp153.2.3.1openSUSE-SU-2021:1274-1
openSUSETumbleweedfail2ban0.11.2-3.1openSUSE-SU-2024:10749-1
Alpinev3.15fail2ban0.11.2-r1ALPINE-CVE-2021-32749
Alpinev3.16, v3.17, v3.18 and 6 morefail2ban0.11.2-r2ALPINE-CVE-2021-32749

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High
  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON