# CVE-2021-44227: Cross Site Request Forgery in mailman

> An attacker can exploit a CSRF vulnerability in GNU Mailman to change admin passwords or modify settings by tricking a moderator into using a stolen token.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 2 Dec 2021
- **Updated:** 4 Aug 2024
- **Also known as:** ALSA-2021:4916, GHSA-xq58-69h2-765m, OESA-2021-1456, PYSEC-2026-660, RHSA-2021:4915, RHSA-2021:4916, RHSA-2021:5080, RHSA-2021:5081, RLSA-2021:4916, UBUNTU-CVE-2021-44227, USN-5180-1

## What is CVE-2021-44227?

CVE-2021-44227 is a high-severity vulnerability in Debian Debian Linux, published on 2 Dec 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

In GNU Mailman before 2.1.38, a list member or moderator can get a CSRF token and craft an admin request (using that token) to set a new admin password or make other changes.

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2021-44227?

3 open source packages ship an affected version, including mailman. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mailman` | PyPI | All versions | 2.1.38 |
| `mailman` | PyPI | All versions | 2.1.38 |
| `mailman` | PyPI | All versions | 2.1.38 |
| `mailman` | AlmaLinux:8 | All versions | 3:2.1.29-12.module_el8.5.0+26+48d4c9ee.2 |
| `mailman` | AlmaLinux:8 | All versions | 3:2.1.29-12.module_el8.5.0+2602+327eb9f3.2 |
| `mailman` | Red Hat:enterprise_linux:8::appstream | All versions | 3:2.1.29-12.module+el8.5.0+13466+327eb9f3.2 |
| `mailman-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 3:2.1.29-12.module+el8.5.0+13466+327eb9f3.2 |
| `mailman-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 3:2.1.29-12.module+el8.5.0+13466+327eb9f3.2 |
| `mailman` | Red Hat:rhel_e4s:8.1::appstream | All versions | 3:2.1.29-5.module+el8.1.0+13542+e9b93c88 |
| `mailman-debuginfo` | Red Hat:rhel_e4s:8.1::appstream | All versions | 3:2.1.29-5.module+el8.1.0+13542+e9b93c88 |
| `mailman-debugsource` | Red Hat:rhel_e4s:8.1::appstream | All versions | 3:2.1.29-5.module+el8.1.0+13542+e9b93c88 |
| `mailman` | Red Hat:rhel_eus:8.2::appstream | All versions | 3:2.1.29-6.module+el8.2.0+13543+86b2c701 |
| `mailman-debuginfo` | Red Hat:rhel_eus:8.2::appstream | All versions | 3:2.1.29-6.module+el8.2.0+13543+86b2c701 |
| `mailman-debugsource` | Red Hat:rhel_eus:8.2::appstream | All versions | 3:2.1.29-6.module+el8.2.0+13543+86b2c701 |
| `mailman` | Red Hat:rhel_eus:8.4::appstream | All versions | 3:2.1.29-11.module+el8.4.0+13467+746daedf.2 |
| `mailman-debuginfo` | Red Hat:rhel_eus:8.4::appstream | All versions | 3:2.1.29-11.module+el8.4.0+13467+746daedf.2 |
| `mailman-debugsource` | Red Hat:rhel_eus:8.4::appstream | All versions | 3:2.1.29-11.module+el8.4.0+13467+746daedf.2 |
| `mailman` | Rocky Linux:8 | All versions | 3:2.1.29-12.module+el8.5.0+703+19300c10 |
| `mailman` | Rocky Linux:8 | All versions | 3:2.1.29-12.module+el8.5.0+717+27fd1ba7.2 |

Products: Debian Debian Linux, Gnu Mailman.

## How do I fix CVE-2021-44227?

Upgrade mailman to 2.1.38 or later.

## Is CVE-2021-44227 being exploited?

There is no known exploitation of CVE-2021-44227 in the wild and no public exploit code.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-44227 and fix it if it is affected.

What it is: CVE-2021-44227 is a high-severity vulnerability in Debian Debian Linux, published on 2 Dec 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-44227 in the wild and no public exploit code.

Affected packages and fixed versions:
- mailman (PyPI): affected all versions; fixed in 2.1.38
- mailman (PyPI): affected all versions; fixed in 2.1.38
- mailman (PyPI): affected all versions; fixed in 2.1.38

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-44227/ (Markdown: https://insights.sbomify.com/CVE-2021-44227/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-44227
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-44227
- OSV: https://osv.dev/vulnerability/CVE-2021-44227

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-44227/
Summaries are generated and may contain mistakes; the official description above is the record.
