CVE-2024-45388

published 2 Sep 2024 · updated 3 Sep 2024

Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)

9.5CriticalCVSS 7.5EPSS 56%1 public exploits

A public exploit exists; no exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 56%. No fixed version is recorded.

Hoverfly is a lightweight service virtualization/ API simulation / API mocking tool for developers and testers. The `/api/v2/simulation` POST handler allows users to create new simulation views from the contents of a user-specified file. This feature can be abused by an attacker to read arbitrary files from the Hoverfly server. Note that, although the code prevents absolute paths from being specified, an attacker can escape out of the `hf.Cfg.ResponsesBodyFilesPath` base path by using `../` segments and reach any arbitrary files. This issue was found using the Uncontrolled data used in path expression CodeQL query for python. Users are advised to make sure the final path (`filepath.Join(hf.Cfg.ResponsesBodyFilesPath, filePath)`) is contained within the expected base path (`filepath.Join(hf.Cfg.ResponsesBodyFilesPath, "/")`). This issue is also tracked as GHSL-2023-274.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
SpectoLabs<1.10.3

Exploit evidence

1 public sources

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-45388 severity on Zeptric[![CVE-2024-45388](https://zeptric.io/badge/cve/CVE-2024-45388.svg)](https://zeptric.io/cve/CVE-2024-45388)