CVE-2026-77387
CPU DoS via crafted long malformed coordinate strings in geopy ≤2.5.0
- CVSS 4.0
- CWE-1333
- Resource Management
- Remote
geopy is a geocoding library for Python. Prior to 2.5.0, geopy.Point and Point.from_string() can spend excessive CPU time due to inefficient regular-expression behavior when an application passes a long malformed coordinate string without the 256-character input limit used by the fix. Geocoder reverse methods also reach the vulnerable parsing path when called with string inputs. Repeated attacker-controlled requests can cause a denial of service, while the numeric Point constructor is unaffected. This issue is fixed in version 2.5.0.
- CWE
- CWE-1333
- CVSS base score
- 4.0
- Published
- 2026-10-01
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Algorithm
- Code defect classification
- Timing Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- geopy
- Fixed by upgrading
- Yes
Solution
Upgrade geopy to version 2.5.0 or newer.
Vulnerable code sample
from geopy.point import Point
def get_location(coord_str: str) -> Point:
# VULNERABLE: unbounded parsing of malformed coordinate strings
return Point.from_string(coord_str)Patched code sample
from geopy.point import Point
def get_location(coord_str: str) -> Point:
# FIX: enforce input length limit before parsing
if len(coord_str) > 256:
raise ValueError("Coordinate string exceeds maximum allowed length")
return Point.from_string(coord_str)Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Guard Point.from_string against ReDoS on very long inputs (#608) (#610) (geopy/geopy)
geopy/point.py,geopy/point.py · Point.from_string
Cite this entry
@misc{vaitp:cve202677387,
title = {{CPU DoS via crafted long malformed coordinate strings in geopy ≤2.5.0}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-77387},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-77387/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
