Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-32749

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-32749
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:17 UTC · Revision 1

Source evidence

CVE-2021-32749

core-osv · Original source

Published 16 Jul 2021, 18:15 UTC

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.

osv:CVE-2021-32749
Complete source record
{
  "id": "e8e238b3ff601f8a500214f21a79dea34555c8a741daebf47e9b97772b6daffd",
  "url": "https://osv.dev/vulnerability/CVE-2021-32749",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-32749",
    "summary": "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.",
    "evidence": "osv:CVE-2021-32749",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-32749",
      "aliases": [
        "CVE-2021-32749",
        "GHSA-m985-3f3v-cwmm"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/fail2ban/fail2ban",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "35280044ffdb6a8166fc6ad5497cfae7032c71a6"
                },
                {
                  "fixed": "2ed414ed09b3bb4c478abc9366a1ff22024a33c9"
                },
                {
                  "fixed": "410a6ce5c80dd981c22752da034f2529b5eee844"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:fail2ban:fail2ban:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "0.9.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "2ed414ed09b3bb4c478abc9366a1ff22024a33c9"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "410a6ce5c80dd981c22752da034f2529b5eee844"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.10.6",
            "0.10.5",
            "0.10.4",
            "0.10.3",
            "0.10.2",
            "0.10.1",
            "0.10.0",
            "0.9.7",
            "0.9.6",
            "0.9.5",
            "0.10.0a1",
            "0.9.4",
            "0.9.3",
            "0.9.2",
            "0.9.1",
            "0.8.12",
            "0.8.11",
            "0.8.11.pre1",
            "0.8.10",
            "0.8.9",
            "0.8.8",
            "0.8.7.1",
            "0.8.7",
            "0.8.6",
            "0.8.5",
            "0.8.4",
            "0.8.3",
            "0.8.2",
            "0.8.1",
            "0.7.8",
            "0.7.9",
            "0.8.0",
            "0.7.6",
            "0.7.7",
            "0.6.1",
            "0.7.4",
            "0.7.5",
            "0.6.0",
            "0.7.3",
            "0.7.1",
            "0.4.1",
            "0.4.0",
            "0.3.1",
            "0.3.0",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-32749.json"
          }
        }
      ],
      "modified": "2026-10-20T10:53:46.187893125Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5WHJK2X2MR2WDYZMCW7COZXJDUSDYMY6/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZRYQ77MTX5WSV33VCJLK4KBKR55QZ7ZA/",
        "https://security.gentoo.org/glsa/202310-13",
        "https://github.com/fail2ban/fail2ban/commit/2ed414ed09b3bb4c478abc9366a1ff22024a33c9",
        "https://github.com/fail2ban/fail2ban/commit/410a6ce5c80dd981c22752da034f2529b5eee844",
        "https://github.com/fail2ban/fail2ban/security/advisories/GHSA-m985-3f3v-cwmm"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:fail2ban:fail2ban:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fail2ban:fail2ban",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0.10.0"
                  },
                  {
                    "fixed": "0.10.7"
                  },
                  {
                    "introduced": "0.11.0"
                  },
                  {
                    "fixed": "0.11.3"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  },
                  {
                    "introduced": "35"
                  },
                  {
                    "last_affected": "35"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-32749",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384602,
  "published_at": "2021-07-16T18:15:08.27+00:00"
}