BreachSpiderVerified, not vibes

CVE-2021-32749 in Fail2Ban and 1 more product

High 8.1

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 action...

Affects 2 products from 2 vendors. Facts below cite their sources.

CVSS 3.18.1
EPSS3.4%
EPSS percentile90th
FixUnknown

Remotely exploitable over the network, high complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Fail2Ban Fail2Ban ≤ 0.9.7 ≥ 0.10.0, < 0.10.7 ≥ 0.11.0, < 0.11.3
Fedoraproject Fedora 34 35

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2021-32749
BreachSpider IDBS-2021-GLOBAL-076651-H
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published2021-07-16
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-78: OS Command Injection

Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.

CWE-94: Code Injection

Attacker injects arbitrary code that is executed by the application process.

Related attack patterns (CAPEC)

CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94

CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-78

CAPEC-108 Command Line Execution through SQL Injection via CWE-78

CAPEC-6 Argument Injection via CWE-78

CAPEC-15 Command Delimiters via CWE-78

Show all 8

CAPEC-77 Manipulating User-Controlled Variables via CWE-94

CAPEC-88 OS Command Injection via CWE-78

CAPEC-242 Code Injection via CWE-94

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

A vulnerability in fail2ban versions 0.9.7 and prior, 0.10.0 through 0.10.6, and 0.11.0 through 0.11.2 allows for potential remote code execution via unescaped sequences in the mail-whois action.

The vulnerability arises from the use of the `mail` command from the mailutils package in mail actions like `mail-whois`. If unescaped sequences such as `\n~` are present, they can be used to execute arbitrary commands.

Questions

What is CVE-2021-32749?

A vulnerability in fail2ban versions 0.9.7 and prior, 0.10.0 through 0.10.6, and 0.11.0 through 0.11.2 allows for potential remote code execution via unescaped sequences in the mail-whois action.

What is the CVSS score for CVE-2021-32749?

CVE-2021-32749 has CVSS 8.1 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 3.4%.

Is CVE-2021-32749 actively exploited?

No confirmed active exploitation of CVE-2021-32749 as of 2026-09-25.

How do I remediate CVE-2021-32749?

Priority: IMMEDIATE.

What systems are affected by CVE-2021-32749?

CVE-2021-32749 affects Fail2Ban Fail2Ban; Fedoraproject Fedora.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Fail2Ban","product":"Fail2Ban","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.