Skip to content
OpenAdvisories
High · 7.5 CVE-2021-32837 EUVD-2023-0144GHSA-g3pv-pj5f-3hfqPYSEC-2023-25

mechanize vulnerable to ReDoS

Published Jan 17, 2023 · Updated Dec 22, 2025 · 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.

Affected products

VendorProductAffectedFixed
python-mechanize mechanize 0.4.6 – < 0.4.6 0.4.6

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-mechanize 1:0.4.7-1 —
Debian 13 python-mechanize 1:0.4.7-1 —
Debian 12 python-mechanize 1:0.4.7-1 —
Debian 11 python-mechanize 1:0.4.5-2+deb11u1 DLA-4418-1
Debian 10 python-mechanize 1:0.2.5-3+deb10u1 DLA-3460-1
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS python-mechanize No fix yet —
Ubuntu 18.04 LTS python-mechanize No fix yet —
Ubuntu 16.04 LTS python-mechanize No fix yet —
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP4 python-mechanize 0.4.8-bp154.2.3.1 openSUSE-SU-2023:0030-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-mechanize 0.4.10-1.4 openSUSE-SU-2025:15098-1
openSUSE Leap 15.4 python-mechanize 0.4.8-bp154.2.3.1 openSUSE-SU-2023:0030-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI mechanize < 0.4.6 0.4.6 GHSA-g3pv-pj5f-3hfq

Advisories 4

References