Skip to content
Path traversal Advisory Beginner

GHSL-2024-293: Arbitrary File Read on get_log_file REST API in Apache Doris

The get_log_file REST API in Apache Doris did not validate the file path supplied by an admin user, allowing path traversal to read arbitrary files on the server. An attacker with admin privileges could retrieve sensitive files outside the log directory.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

The getlogfile REST API allows user with Admin privilege to read arbitrary files on the server

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

Impact

An admin user could read arbitrary files on the server, leading to information disclosure.

What the attacker needed

Enable_get_log_file_api set to true; admin user privileges

The fix

The vulnerability was fixed in CVE-2024-48019.

How it was found

  1. Enable the get_log_file API in the fe config by setting enable_get_log_file_api to true.
  2. Send a GET request to /api/get_log_file with type=fe.audit.log and a file parameter containing a path traversal sequence.
  3. The server returns the contents of the requested file outside the log directory.

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 is a path traversal bug. The server takes a file name from the user and uses it to build a path without checking it. By using '..' in the file name, an attacker can escape the intended log folder and read other files on the machine. It only works if the feature is turned on and the attacker is already an admin.

What is Path traversal?

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

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

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.