Skip to main content
← All vulnerabilities
CVE-2024-45388GO-2024-3108GHSA-6XX4-X46F-F897

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.10.3
1 Nuclei template
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • SpectoLabs hoverfly

    fixed in 1.10.3

  • github.com/SpectoLabs/hoverflyGo

    fixed in 1.10.3

  • github.com/spectolabs/hoverflyGo

    fixed in 1.10.3

References 5

GitHub · SpectoLabs/hoverfly

codeql.github.com

GitHub · spectolabs/hoverfly

GitHub · projectdiscovery/nuclei-templates