cbcvebase.
CVE-2024-45388
published 2024-09-02

CVE-2024-45388: Hoverfly is a lightweight service virtualization/ API simulation / API mocking tool for developers and testers. The `/api/v2/simulation` POST handler allows…

PriorityP183high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
55.86%
98.9th percentile
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

3 ranges
VendorProductVersion rangeFixed in
github.comspectolabs_hoverfly>= 0 < 1.10.31.10.3
hoverflyhoverfly< 1.10.31.10.3
spectolabshoverfly< 1.10.31.10.3

Detection & IOCsextracted from sources · hover to see the quote

url/api/v2/simulation
path../../../../../../../etc/passwd
snort
alert http any any -> [$HOME_NET,$HTTP_SERVERS] any (msg:"ET WEB_SPECIFIC_APPS Hoverfly Arbitrary File Read via Traversal Attempt Inbound (CVE-2024-45388)"; flow:established,to_server; http.uri; content:"/api/v2/simulation"; fast_pattern; http.request_body; content:"|22|bodyFile|22 3a 20 22|"; pcre:"/^.{0,10}(?:(?:\x2e|%2[Ee]){1,}(?:(?:\x2f|%2[Ee])|(?:\x5c|%5[Cc]))){2,}/R"; reference:cve,2024-45388; classtype:web-application-attack; sid:2055977; rev:1; metadata:affected_product Hoverfly, attack_target Server, created_at 2024_09_19, cve CVE_2024_45388, deployment Perimeter, deployment Internal, confidence High, signature_severity Major, tag Exploit, updated_at 2024_09_19, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application; target:dest_ip;)
  • Exploit payload targets the PUT /api/v2/simulation endpoint with a JSON body containing a 'bodyFile' key set to a path-traversal string (e.g., ../../../../../../../etc/passwd). Match on HTTP method PUT or POST to this URI combined with 'bodyFile' in the request body.
  • Successful exploitation response contains both 'root:.*:0:0:' (passwd file content) and the string 'hoverflyVersion' in a 200 OK JSON response with Content-Type: application/json.
  • Path traversal uses `../` segments to escape the ResponsesBodyFilesPath base directory. The Snort PCRE matches dot-encoded or percent-encoded traversal sequences (e.g., %2e%2e%2f) in the bodyFile value immediately following the JSON key.
  • Hoverfly instances exposed on the internet can be identified via Shodan using the favicon hash 1357234275 to scope detection or hunting.
  • ·The vulnerability only exists in Hoverfly versions prior to 1.10.3. The path traversal is possible because absolute paths are blocked but relative `../` sequences are not sanitized against the ResponsesBodyFilesPath base path.
  • ·The Nuclei template uses the PUT HTTP method against /api/v2/simulation, while the CVE description references the POST handler — detection rules should cover both PUT and POST methods on this endpoint.
  • ·The exploit requires no authentication (PR:N), making it exploitable by unauthenticated remote attackers against any network-accessible Hoverfly instance.

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vulncheck7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.