pygeoapi CVE-2026-42351
HIGHSeverity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Remote unauthenticated traversal (AV:N/PR:N/UI:N) exposing directory contents yields C:H with no integrity or availability impact; kept AC:L since the '..' request is trivial once the required stac-collection config is present.
Primary rating from Vendor (https://github.com/geopython/pygeoapi).
CVSS VectorVendor: https://github.com/geopython/pygeoapi
Lifecycle Timeline
4DescriptionCVE.org
Impact
A raw string path concatenation vulnerability in pygeoapi's STAC FileSystemProvider plugin can allow for requests to STAC collection based collections to expose directories without authentication. The issue manifests when pygeoapi is deployed without a proxy or web front end that would normalize URLs with .. values, along with a resource of type stac-collection defined in configuration.
Patches
The issue has been patched in master branch and made available as part of the 0.23.3 release.
The commit/fix can be found in bf25b8695edbdd5476eeffc102b633d1d3e45f52.
Workarounds
Users can safeguard existing applications by disabling STAC collection based resources in their pygeoapi config, until 0.23.3 can be installed and deployed.
AnalysisAI
Directory exposure in pygeoapi's STAC FileSystemProvider (versions 0.23.0 through 0.23.2) lets remote unauthenticated attackers read arbitrary directories on the server by supplying '..' traversal sequences in requests to a stac-collection resource. The flaw stems from raw string path concatenation and only surfaces when pygeoapi is deployed without a URL-normalizing proxy and a stac-collection resource is configured. There is no public exploit identified at time of analysis and EPSS is low (0.09%), but exploitation is trivial (AV:N/AC:L/PR:N) wherever the preconditions hold.
Technical ContextAI
pygeoapi is a Python (pkg:pip/pygeoapi) implementation of OGC API standards for serving geospatial data, including SpatioTemporal Asset Catalog (STAC) endpoints. The affected component is the STAC FileSystemProvider plugin (pygeoapi/provider/filesystem.py), which maps incoming URL path segments to files on disk to serve STAC collection assets. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / Path Traversal): get_data_path() built the on-disk target via os.path.join(self.data, dirpath) using the raw, un-sanitized request path. Because no normalization or '..' rejection was applied, an attacker-supplied dirpath containing '..' resolves outside the intended data root, exposing parent directories. The patched code adds an explicit check that raises ProviderInvalidQueryError whenever '..' appears in dirpath, as confirmed by the commit diff and the added test asserting rejection of '../../poi_portugal'.
RemediationAI
Vendor-released patch: upgrade to pygeoapi 0.23.3, which adds explicit rejection of paths containing '..' in the STAC FileSystemProvider (commit bf25b8695edbdd5476eeffc102b633d1d3e45f52). Until 0.23.3 can be installed, the vendor-recommended workaround is to disable STAC collection based resources (remove or comment out any 'stac-collection' type resources) in the pygeoapi configuration; the trade-off is that STAC filesystem catalog endpoints become unavailable to legitimate users. As an additional compensating control, place pygeoapi behind a reverse proxy or web front end (nginx, Apache httpd, or Traefik) that normalizes URLs and collapses '..' sequences before they reach the application, which neutralizes the traversal without disabling functionality. Refer to the advisory at https://github.com/geopython/pygeoapi/security/advisories/GHSA-f6pr-83pg-ghh6 and the patch commit at https://github.com/geopython/pygeoapi/commit/bf25b8695edbdd5476eeffc102b633d1d3e45f52.
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-f6pr-83pg-ghh6