CVE-2021-32837 in the critical feed json
mechanize vulnerable to ReDoS
published 2023-01-17 3 y ago modified 2026-06-17 4 mo ago also GHSA-g3pv-pj5f-3hfq , PYSEC-2023-25 , EUVD-2023-0144
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 28.7%
- EPSS 28.7% chance of exploitation in 30 days, percentile 98%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi mechanize 0.4.6
- mechanize_project mechanize 0.4.6
- python-mechanize Debian 14, Debian 13, Debian 12 1:0.4.7-1
debian advisories DEBIAN-CVE-2021-32837
- python-mechanize openSUSE Tumbleweed 0.4.10-1.4
- python-mechanize Package Hub 15 SP4, openSUSE Leap 15.4 0.4.8-bp154.2.3.1
opensuse advisories openSUSE-SU-2025:15098-1openSUSE-SU-2023:0030-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-32837 updated cvss 7.5
mechanize: Regular Expression Denial of Service
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 20 mo ago
Exploit prediction
28.66% chance of exploitation in the next 30 days, higher than 98% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- securitylab.github.com https://securitylab.github.com/advisories/GHSL-2021-108-python-mechanize-mechanize/ referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/python-mechanize/mechanize/blob/3acb1836f3fd8edc5a758a417dd46b53832ae3b5/mechanize/_urllib2_fork.py#L878-L879 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mechanize | <0.4.6 |
0.4.6 |
Affected products
- python-mechanize mechanize
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/python-mechanize/mechanize/commit/dd05334448e9f39814bab044d2eaa5ef69b410d6
web, patch, third-party-advisory
-
securitylab.github.com
/advisories/GHSL-2021-108-python-mechanize-mechanize/
exploit, third-party-advisory, evidence, advisory
-
github.com
/python-mechanize/mechanize/blob/3acb1836f3fd8edc5a758a417dd46b53832ae3b5/mechanize/_urllib2_fork.py#L878-L879
web, exploit, third-party-advisory, evidence
-
github.com
/python-mechanize/mechanize/releases/tag/v0.4.6
web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2023/06/msg00022.html
mailing-list, web
-
lists.debian.org
/debian-lts-announce/2025/12/msg00028.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-32837
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/mechanize/PYSEC-2023-25.yaml
web
-
github.com
/python-mechanize/mechanize
package
-
securitylab.github.com
/advisories/GHSL-2021-108-python-mechanize-mechanize
advisory
-
github.com
/advisories/GHSA-g3pv-pj5f-3hfq
advisory
Sources
- CVE List CVE-2021-32837
- GitHub Advisory GHSA-g3pv-pj5f-3hfq
- NVD CVE-2021-32837
- OSV PYSEC-2023-25
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.