Vulnerability · Published Sep 2, 2024 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity information exposure in hoverfly from SpectoLabs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 55.6% (higher than 99.0% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)55.6%top 1.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Nuclei

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/SpectoLabs/hoverfly1.10.3GHSA-6xx4-x46f-f897
Gogithub.com/SpectoLabs/hoverfly1.10.3GO-2024-3108
Gogithub.com/spectolabs/hoverfly1.10.3GHSA-6xx4-x46f-f897

Affected products (as reported)

VendorProductVersions
SpectoLabs hoverfly < 1.10.3

Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References