# CVE-2021-32837: mechanize vulnerable to ReDoS

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 28.7%, higher than 98% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2023-01-17T00:00:00.000Z
- Modified: 2026-06-17T03:53:43.880Z
- Also known as: GHSA-g3pv-pj5f-3hfq, PYSEC-2023-25
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- python-mechanize mechanize: from 0.4.6 before 0.4.6
- mechanize (PyPI): before 0.4.6; before dd05334448e9f39814bab044d2eaa5ef69b410d6
- mechanize_project mechanize: before 0.4.6

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://securitylab.github.com/advisories/GHSL-2021-108-python-mechanize-mechanize/> (exploit, advisory, evidence, third-party-advisory)
- <https://github.com/python-mechanize/mechanize/blob/3acb1836f3fd8edc5a758a417dd46b53832ae3b5/mechanize/_urllib2_fork.py#L878-L879> (exploit, evidence, third-party-advisory, web)
- <https://github.com/python-mechanize/mechanize/releases/tag/v0.4.6> (third-party-advisory, web)
- <https://github.com/python-mechanize/mechanize/commit/dd05334448e9f39814bab044d2eaa5ef69b410d6> (fix, patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2023/06/msg00022.html> (mailing-list, web)
- <https://lists.debian.org/debian-lts-announce/2025/12/msg00028.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32837> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/mechanize/PYSEC-2023-25.yaml> (web)
- <https://github.com/python-mechanize/mechanize> (package)
- <https://securitylab.github.com/advisories/GHSL-2021-108-python-mechanize-mechanize> (advisory)
- <https://github.com/advisories/GHSA-g3pv-pj5f-3hfq> (advisory)

## Sources

- CVE List: [CVE-2021-32837](https://www.cve.org/CVERecord?id=CVE-2021-32837), CVE Terms of Use, modified 2025-12-22
- GitHub Advisory Database: [GHSA-g3pv-pj5f-3hfq](https://github.com/advisories/GHSA-g3pv-pj5f-3hfq), CC-BY-4.0, modified 2025-12-22
- NVD: [CVE-2021-32837](https://nvd.nist.gov/vuln/detail/CVE-2021-32837), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-25](https://osv.dev/vulnerability/PYSEC-2023-25), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2021-32837 · Whole record: https://cve.day/CVE-2021-32837.json · Rebuilt by cve.day 2026-11-25T22:58:08.133Z
