Skip to content
Path traversal Disclosed report Intermediate CVE-2024-5986

H2O has an External Control of File Name or Path vulnerability

The H2O-3 platform allows an attacker to write arbitrary data to any file on the server by abusing the /3/Parse endpoint to set the header of an empty file, then exporting it via /3/Frames/framename/export. This could lead to remote code execution and full system compromise.

ai.h2o:h2o-core

Originally disclosed on huntr

Critical View original

A vulnerability in h2oai/h2o-3 version 3.46.0.1 allows remote attackers to write arbitrary data to any file on the server. This is achieved by exploiting the /3/Parse endpoint to inject attacker-controlled data as the header of an empty file, which is then exported using the /3/Frames/framename/export endpoint. The impact of this vulnerability includes the potential for remote code execution and complete access to the system running h2o-3, as attackers can overwrite critical files such as private SSH keys or script files.

From the GitHub Advisory Database (GHSA-wj3h-wx8g-x699, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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 application fails to properly validate or restrict the file path and content when exporting a frame, allowing attacker-controlled data to be written to arbitrary locations.

Impact

Attackers could overwrite critical files such as private SSH keys or script files, potentially leading to remote code execution and complete system access.

What the attacker needed

Access to the H2O-3 web interface

How it was found

  1. Send a request to the /3/Parse endpoint to create an empty file with attacker-controlled data as its header.
  2. Use the /3/Frames/framename/export endpoint to export the file to an arbitrary path on the server.

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.

This bug lets someone trick the H2O-3 software into saving harmful content into any file on the computer. By misusing two web addresses, an attacker can put their own text into a file and then save it wherever they want, potentially taking over the whole system.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from ai.h2o:h2o-core

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.