CVE-2026-65700

h2oGPT 0.2.1 Path Traversal via OpenAI-compatible Files API

Published Jul 23, 2026 CVSS 4.0 · 9.3 Critical EPSS 1.5% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared H2oai
H2oai h2ogpt
Vendors & Products H2oai
H2oai h2ogpt
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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 27, 2026, 4:19 PM
Reserved
Jul 22, 2026, 8:26 PM
Status
Deferred
Published
Jul 23, 2026, 6:17 PM
Modified
Oct 24, 2026, 1:10 PM