CVE-2021-32837
mechanize vulnerable to ReDoS
Reported by github_m · Published January 17, 2023
mechanize is fixed in dd05334448e9f39814bab044d2eaa5ef69b410d6 and 0.4.6 (PyPI)
mechanize, a library for automatically interacting with HTTP web servers, contains a regular expression that is vulnerable to regular expression denial of service (ReDoS) prior to version 0.4.6. If a web server responds in a malicious way, then mechanize could crash. Version 0.4.6 has a patch for the issue.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| mechanize | PyPI | dd05334448e9f39814bab044d2eaa5ef69b410d6, 0.4.6 |
| mechanize | RubyGems | 0.4.6 |
| mechanize | mechanize_project | 0.4.6 |
| mechanize | python-mechanize | 0.4.6 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| python-mechanize | mechanize | 0.4.6 |
| PyPI | mechanize | 0 |
| python-mechanize | mechanize | 0.4.6 |
| RubyGems | mechanize | 0 |
Timeline
- Jan 17, 2023 CVE Published
- Jan 18, 2023 EPSS Score (30 in total, the first dated here)
- Dec 22, 2025 CVE Updated
- Mar 10, 2026 Security Advisory (3 in total, the first dated here)
- Aug 1, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-32837
vulnetix vdb fixes CVE-2021-32837
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-32837/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20230620 [SECURITY] [DLA 3460-1] python-mechanize security update mailing-list
- https://github.com/advisories/GHSA-g3pv-pj5f-3hfq advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/mechanize/PYSEC-2023-25.yaml advisory
- https://github.com/python-mechanize/mechanize url
- https://securitylab.github.com/advisories/GHSL-2021-108-python-mechanize-mechanize advisory
- https://nvd.nist.gov/vuln/detail/CVE-2021-32837 advisory
- https://lists.debian.org/debian-lts-announce/2025/12/msg00028.html url