CVE-2021-32837: GHSL-2021-108: ReDoS (Regular Expression Denial of Service) in mechanize - CVE-2021-32837

Published Sep 9, 2021
·
Updated

mechanize contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service).

Other sources

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.

— GitHub

Affected Software

2 affected componentsFixes available
pip/mechanize<0.4.6
0.4.6
Mechanize Project Mechanize Python<0.4.6

Event History

Sep 9, 2021
Advisory Published
via GitHub Security Lab·12:00 AM
Data Sourced
via GitHub Security Lab·12:00 AM
Description
Jan 17, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 18, 2023
Advisory Published
via GitHub·12:30 AM

Frequently Asked Questions

1

What is CVE-2021-32837?

CVE-2021-32837 is a vulnerability in the mechanize library that allows for regular expression denial of service (ReDoS) attacks, potentially causing crashes.

2

How does CVE-2021-32837 affect me?

If you are using the mechanize library prior to version 0.4.6, your application may be vulnerable to ReDoS attacks, leading to potential crashes.

3

What is regular expression denial of service (ReDoS)?

Regular expression denial of service (ReDoS) is a vulnerability where a maliciously crafted input can cause a regular expression pattern to exhibit exponential time complexity, leading to a denial of service.

4

How can I mitigate CVE-2021-32837?

To mitigate CVE-2021-32837, update the mechanize library to version 0.4.6 or later, which contains a patch for the vulnerability.

5

Are there any references for more information about CVE-2021-32837?

Yes, you can find more information about CVE-2021-32837 in the following references: [link1](https://github.com/python-mechanize/mechanize/blob/3acb1836f3fd8edc5a758a417dd46b53832ae3b5/mechanize/_urllib2_fork.py#L878-L879), [link2](https://github.com/python-mechanize/mechanize/commit/dd05334448e9f39814bab044d2eaa5ef69b410d6), [link3](https://github.com/python-mechanize/mechanize/releases/tag/v0.4.6)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203