LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 6.1Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Fail2ban could run unintended commands when its mail-whois notification action processed malicious whois text through GNU mailutils. This is not a broad internet worm risk: exploitation requires the vulnerable action, affected versions, and attacker influence over whois responses, such as MITM or a compromised whois server. Patch or disable that action.

Executive priority

Treat this as a targeted hardening and patching item, not an emergency mass-exploitation incident. Prioritize internet-facing Linux servers using fail2ban email whois notifications, especially where package updates have lagged.

Technical view

CVE-2021-32749 is a CWE-78 command injection issue in fail2ban mail-whois actions using mailutils mail. Unescaped newline-tilde sequences from foreign input, such as whois output, could be interpreted by mailutils. Affected versions are <=0.9.7, 0.10.0-0.10.6, and 0.11.0-0.11.2. Fixed versions are 0.10.7 and 0.11.3.

Likely exposure

Exposure is likely limited to systems running affected fail2ban versions with mail-whois or related mailutils-based actions enabled. Servers using default ban-only actions or non-mail-whois notifications may not have the vulnerable path, based on the provided sources.

Exploitation context

No KEV listing is provided and the source bundle does not cite active exploitation. The advisory describes high-complexity exploitation requiring malicious characters in whois server output, achieved via MITM or control of a whois server, plus mail action execution.

Researcher notes

The key exposure question is configuration-dependent: affected version alone is insufficient if the vulnerable mail-whois action is unused. Evidence supports possible remote code execution, but the attack path depends on attacker-controlled whois output and mailutils handling. Avoid assuming exploitation in the wild from this bundle.

Mitigation direction

  • Upgrade fail2ban to 0.10.7, 0.11.3, or a vendor-fixed package.
  • Disable or replace the mail-whois action where immediate upgrade is unavailable.
  • Apply the vendor manual patch only if package upgrade is not available.
  • Track Fedora, Gentoo, or relevant distribution advisories for fixed packages.

Validation and detection

  • Inventory fail2ban versions and identify hosts in the affected version ranges.
  • Review fail2ban actions for mail-whois or mailutils-based notification use.
  • Confirm the installed package includes the upstream fix or vendor backport.
  • Verify temporary mitigations remove mail-whois from active jail actions.
Prepared
Confidence
high
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-32749 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
7Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.1CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N1.64Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.1Medium
CVSS 3.1 vector shape for CVE-2021-32749Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
fail2banfail2ban<= 0.9.7, >= 0.10.0, <= 0.10.6, >= 0.11.0, <= 0.11.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-78 · source CWE mapping

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.