geopy: Regular Expression Denial of Service (ReDoS) in geopy.PointGHSA-mhvh-fq92-pfmr
MEDIUMFix: geopy/geopy#610GHSA-mhvh-fq92-pfmr is a medium-severity (CVSS 4) CWE-1333 vulnerability in geopy. A fix is available for geopy — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-mhvh-fq92-pfmr.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-mhvh-fq92-pfmr by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
geopyReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
geopy.Point and Point.from_string() may take excessive CPU time when parsing long, malformed coordinate strings due to inefficient regular-expression behavior. The numeric Point constructor is not affected.
Geocoders' reverse methods called with string inputs exercise the vulnerable path.
Applications are affected when they pass attacker-controlled strings to these APIs without an appropriate length limit. Repeated requests may cause denial of service.
Patches
Fixed in geopy 2.5.0 by rejecting overly long (over 256 characters) coordinate strings before parsing.
Workarounds
Limit coordinate strings to a reasonable maximum length, such as 256 characters, before passing them to geopy.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | geopy | all versions | 2.5.0pip install --upgrade 'geopy==2.5.0' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for geopy, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update geopy to 2.5.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mhvh-fq92-pfmr is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A MODERATE severity regular expression denial of service (ReDoS) flaw was found in geopy, a Python geocoding library bundled in Red Hat AI Inference Server and Red Hat Enterprise Linux AI (RHEL AI) container images. When an application passes a long, malformed coordinate string to geopy.Point or Point.from_string(),…
Applications can mitigate this issue by validating and limiting the length of coordinate strings (for example, rejecting inputs longer than 256 characters, matching the limit adopted by the upstream fix) before passing them to geopy.Point, Point.from_string(), or geocoder reverse methods, and by preferring the numeric Point constructor, which is not affected. Restricting or rate-limiting the sources of externally supplied coordinate strings further reduces exposure. The upstream geopy project addressed this issue in version 2.5.0.Source: Red Hat security advisory for GHSA-mhvh-fq92-pfmr (CC BY 4.0)
Frequently Asked Questions
Is GHSA-mhvh-fq92-pfmr in your dependencies?
Find it across PyPI, including transitive dependencies.