H2O Vulnerable to Arbitrary File Overwrite via File Export
The model export endpoint in H2O version 3.46.0 does not restrict the export location, allowing an attacker to overwrite any file on the server with a trained model file. The attacker cannot control the content of the overwrite.
h2oai/h2o-3
Originally disclosed on huntr
In h2oai/h2o-3 version 3.46.0, the endpoint for exporting models does not restrict the export location, allowing an attacker to export a model to any file in the server's file structure, thereby overwriting it. This vulnerability can be exploited to overwrite any file on the target server with a trained model file, although the content of the overwrite is not controllable by the attacker.
From the GitHub Advisory Database (GHSA-47f6-5p7h-5f3h, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the export endpoint accepts a user-supplied file path without validating or restricting it to a safe directory.
Impact
An attacker could overwrite any file on the server with a model file, potentially causing denial of service or disrupting the system, but the content of the overwrite is not controllable.
What the attacker needed
Access to the model export endpoint
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
H2O is a machine learning tool that lets you save trained models to files. The save function did not check where the file was being written, so someone could tell it to save over important system files. This could break the server, but the attacker cannot choose what gets written.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.