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.
Published: 2026-07-23
Score: 9.3 Critical
EPSS: 1.3% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A path traversal flaw exists in the OpenAI-compatible Files API of h2oGPT through version 0.2.1. The API allows an attacker to supply traversal sequences in the bearer token, which the backend treats as an unsanitized path component. This enables the attacker to read, write, or delete any file that the server process can access. By writing to files that are loaded at startup or read by the application, an adversary can execute arbitrary code on the host system. The weakness is a classic unauthorized path traversal (CWE-22).

Affected Systems

Any deployment of h2oGPT version 0.2.1 or earlier from the h2oai:h2ogpt vendor. No narrower version subgroup is listed. No official patch version is currently cited in the advisory, so all susceptible releases remain vulnerable until a fix is released.

Risk and Exploitability

The CVSS score of 9.3 marks this as a critical issue, and the EPSS score of 1% indicates some, although comparatively low, probability of exploitation. The vulnerability is not listed in KeV and can be exploited over the network without authentication, because the default API key is empty, providing a complete bypass. Successful exploitation can lead to full remote code execution on the host system via the described write and read primitives.

Generated by OpenCVE AI on August 3, 2026 at 21:14 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade h2oGPT to a version released after 0.2.1 that addresses the file-path vulnerability.
  • Configure the service to require a non-empty API key and perform token validation before processing any file-related request.
  • Restrict the application’s permissions or a chroot/sandbox to prevent write or delete access to other paths.

Generated by OpenCVE AI on August 3, 2026 at 21:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 27 Jul 2026 13:15:00 +0000

Type Values Removed Values Added
First Time appeared H2oai
H2oai h2ogpt
Vendors & Products H2oai
H2oai h2ogpt

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
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.
Title h2oGPT 0.2.1 Path Traversal via OpenAI-compatible Files API
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-27T16:19:50.766Z

Reserved: 2026-07-22T20:26:09.980Z

Link: CVE-2026-65700

cve-icon Vulnrichment

Updated: 2026-07-27T16:02:13.211Z

cve-icon NVD

Status : Deferred

Published: 2026-07-23T18:17:01.327

Modified: 2026-07-27T17:16:40.310

Link: CVE-2026-65700

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T21:15:05Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')