<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pygeoapi — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/pygeoapi/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/pygeoapi/feed.xml" rel="self" type="application/rss+xml"/><item><title>pygeoapi Path Traversal Vulnerability in STAC FileSystemProvider</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-pygeoapi-path-traversal/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-pygeoapi-path-traversal/</guid><description>A path traversal vulnerability exists in pygeoapi versions 0.23.0 to 0.23.2 within the STAC FileSystemProvider plugin, allowing unauthenticated access to directories when deployed without a URL-normalizing proxy.</description><content:encoded><![CDATA[<p>A path traversal vulnerability has been identified in pygeoapi versions 0.23.0, 0.23.1, and 0.23.2, specifically within the STAC (Spatially Aware Catalog) FileSystemProvider plugin. This flaw allows unauthenticated attackers to access unauthorized directories by manipulating URL paths, particularly when pygeoapi is deployed without a proxy or web front end that normalizes URLs containing <code>..</code> sequences. The vulnerability arises from improper handling of raw string path concatenation, making systems with STAC collection-based resources in their configuration susceptible to unauthorized file system access. This issue was resolved in version 0.23.3.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious HTTP request targeting a pygeoapi instance configured with a STAC collection resource.</li>
<li>The crafted request includes a URL containing path traversal sequences (e.g., <code>../</code>) to navigate the file system.</li>
<li>pygeoapi&rsquo;s STAC FileSystemProvider plugin receives the request and attempts to resolve the file path.</li>
<li>Due to the raw string path concatenation vulnerability, the path traversal sequences are not properly sanitized.</li>
<li>The application constructs an incorrect file path, allowing access to files and directories outside of the intended STAC collection directory.</li>
<li>The attacker retrieves sensitive information or configuration files located in the exposed directories.</li>
<li>The attacker could potentially use the exposed information to further compromise the system.</li>
<li>The final objective is unauthorized access to sensitive data and potentially system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The path traversal vulnerability in pygeoapi allows unauthorized access to directories and files, potentially exposing sensitive data, configuration files, or even source code. The impact depends on the data stored in the exposed directories. Successful exploitation can lead to information disclosure, privilege escalation, and further system compromise. Organizations using vulnerable pygeoapi versions are at risk until they upgrade to version 0.23.3 or implement the recommended workaround.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to pygeoapi version 0.23.3 to patch the vulnerability as detailed in the advisory (<a href="https://github.com/advisories/GHSA-f6pr-83pg-ghh6">https://github.com/advisories/GHSA-f6pr-83pg-ghh6</a>).</li>
<li>As an immediate mitigation, disable STAC collection-based resources in the pygeoapi configuration as described in the advisory (<a href="https://github.com/advisories/GHSA-f6pr-83pg-ghh6">https://github.com/advisories/GHSA-f6pr-83pg-ghh6</a>).</li>
<li>Deploy the Sigma rule &ldquo;pygeoapi Path Traversal Attempt&rdquo; to detect exploitation attempts in web server logs.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>vulnerability</category><category>webserver</category></item></channel></rss>