CVE-2026-65700 Details
Description
h2oGPT through 0.2.1 contains a path traversal vulnerability in the OpenAI-compatible files API that allows unauthenticated remote attackers to read, write, and delete arbitrary files accessible to the server process by supplying traversal sequences in the bearer token. The get_user_dir function in openai_server/backend_utils.py uses the bearer token string unsanitized as a path component via os.path.join, and because the default API key is EMPTY authentication is bypassed, enabling attackers to traverse outside the intended user directory through the file content, delete, and upload endpoints to achieve remote code execution by writing to startup hooks or application-loaded files.
A path traversal vulnerability has been identified in h2oGPT versions through 0.2.1, specifically within the OpenAI-compatible files API. This vulnerability allows unauthenticated remote attackers to read, write, and delete arbitrary files accessible to the server process. Exploitation is achieved by injecting traversal sequences into the bearer token, which is then used unsanitized as a path component. The default API key is EMPTY, bypassing authentication and enabling attackers to traverse outside the designated user directory. The vulnerability can be exploited through the file content, delete, and upload endpoints, potentially leading to remote code execution by writing to startup hooks or application-loaded files.
Users are advised to reject bearer tokens that contain path traversal sequences and to ensure that the final file path is confined within the user's designated directory before performing any file operations. It is also recommended not to run the OpenAI server with authentication disabled on a non-loopback interface.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 23, 2026CISA-ADP
Assessed Jul 27, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/geo-chen/oss/blob/main/h2ogpt.md | [email protected] | ExploitTechnical Analysis |
| https://www.vulncheck.com/advisories/h2ogpt-path-traversal-via-openai-compatible-files-api | [email protected] | Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| h2oGPT | <= 0.2.1 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 27, 2026 | CVE Modified | CISA-ADP |
| Jul 23, 2026 | New CVE Received | [email protected] |
Volerion