CyberRota Analysis
AI-GeneratedThe vulnerability allows unauthenticated remote attackers to exploit the OpenAI-compatible files API in h2oGPT versions up to 0.2.1, enabling them to read, write, and delete arbitrary files on the server due to unsanitized input in the bearer token. This critical flaw can lead to remote code execution by allowing attackers to manipulate files that the server process can access. Organizations using h2oGPT should prioritize immediate remediation to mitigate the risk of unauthorized access and potential system compromise.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD 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.