<?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>H2oGPT 0.2.1 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/h2ogpt-0.2.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 23 Jul 2026 18:28:55 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/h2ogpt-0.2.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>h2oGPT Path Traversal Vulnerability Leads to Remote Code Execution (CVE-2026-65700)</title><link>https://feed.craftedsignal.io/briefs/2026-07-h2ogpt-path-traversal-rce/</link><pubDate>Thu, 23 Jul 2026 18:28:55 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-h2ogpt-path-traversal-rce/</guid><description>h2oGPT through version 0.2.1 contains a critical path traversal vulnerability (CVE-2026-65700) in its OpenAI-compatible files API, allowing unauthenticated remote attackers to achieve arbitrary file read, write, and delete, and ultimately remote code execution, by injecting traversal sequences into the bearer token.</description><content:encoded><![CDATA[<p>CVE-2026-65700 describes a critical path traversal vulnerability affecting h2oGPT through version 0.2.1. This flaw resides within the OpenAI-compatible files API, specifically in the <code>get_user_dir</code> function located in <code>openai_server/backend_utils.py</code>. Attackers can exploit this by supplying path traversal sequences (e.g., <code>../</code> or <code>..\</code>) directly within the bearer token of an HTTP request. Since h2oGPT uses an &quot;EMPTY&quot; default API key, authentication is effectively bypassed, making the vulnerability accessible to unauthenticated remote attackers. Successful exploitation allows for arbitrary file read, write, and deletion, which can be leveraged to write to startup hooks or application-loaded files, thereby achieving remote code execution (RCE) on the underlying server. This poses a significant risk to organizations deploying affected h2oGPT instances.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An unauthenticated remote attacker sends an HTTP POST request to a vulnerable h2oGPT OpenAI-compatible files API endpoint, such as <code>/files/upload</code>, <code>/files/content</code>, or <code>/files/delete</code>.</li>
<li>The attacker crafts the HTTP Authorization header to include a bearer token containing path traversal sequences (e.g., <code>Bearer ../../../path/to/malicious_file.sh</code>) to manipulate the file path.</li>
<li>Due to the default &quot;EMPTY&quot; API key, the h2oGPT server bypasses authentication checks and proceeds to process the request as if it were legitimate.</li>
<li>The <code>get_user_dir</code> function in <code>openai_server/backend_utils.py</code> is invoked, and it incorrectly incorporates the unsanitized bearer token string into a file path using <code>os.path.join</code>.</li>
<li>This misconfiguration allows the attacker to specify an arbitrary file path outside the intended user directory, leading to the ability to read, write, or delete files anywhere on the server where the h2oGPT process has write permissions.</li>
<li>The attacker uploads or modifies a malicious file (e.g., a web shell, a configuration file with injected commands, or a startup script) to a critical system location.</li>
<li>Upon the h2oGPT application restarting, reloading components, or when the tampered file is otherwise executed or loaded, the attacker's injected code achieves remote code execution (RCE) on the server.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-65700 grants unauthenticated remote attackers arbitrary file read, write, and delete capabilities on the compromised h2oGPT server. This directly leads to remote code execution (RCE) by allowing attackers to inject malicious code into application-loaded files or startup hooks. The consequences include complete compromise of the affected server, potential exfiltration of sensitive data, establishment of persistent backdoors, and lateral movement within the victim's network. Given the unauthenticated nature and the high CVSS score of 9.8, the vulnerability poses a critical threat to the confidentiality, integrity, and availability of systems running vulnerable h2oGPT versions.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch CVE-2026-65700 immediately by upgrading h2oGPT to a version beyond 0.2.1 to mitigate this critical vulnerability.</li>
<li>Deploy the Sigma rule <code>Detect CVE-2026-65700 Exploitation Attempt - Path Traversal in Bearer Token</code> to your web server logging infrastructure (e.g., Apache, Nginx access logs).</li>
<li>Monitor web server access logs for HTTP POST requests to OpenAI-compatible API endpoints that contain path traversal sequences (<code>../</code>, <code>..\</code>) within the <code>cs-auth-token</code> field or HTTP Authorization header.</li>
<li>Ensure that all API keys, including default configurations, are replaced with strong, unique, and non-guessable credentials, and that API key authentication is properly enforced.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>path-traversal</category><category>rce</category><category>api-vulnerability</category><category>web-vulnerability</category><category>critical-vulnerability</category></item></channel></rss>