CVE-2024-45388
Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)
Record summary
EIP currently links 1 Nuclei template to CVE-2024-45388.
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.
Exploitation context
Known exploitation
- VulnCheck KEV
- Listed · Dec 5, 2024 · VulnCheck
- Reported exploitation
- Observed · VulnCheck
Available material
- Nuclei templates
- 1
CISA SSVC decision
CISA Coordinator · SSVC 2.0.3 · Evaluated Sep 3, 2024 · Source: CVE List
Affected products and versions
4| Product | Source | Version range | Status |
|---|---|---|---|
hoverflyBrowse SpectoLabs / hoverflyDefault status: unknown | CVE List | < 1.10.3 | affected |
| Before 1.10.3 | affected | ||
hoverflyBrowse hoverfly / hoverfly | VulnCheck | Version data not supplied | |
github.com/SpectoLabs/hoverflyBrowse Go / github.com/SpectoLabs/hoverfly | GitHub Advisory | Before 1.10.3 · Fixed in 1.10.3 | affected |
github.com/spectolabs/hoverflyBrowse Go / github.com/spectolabs/hoverfly | GitHub Advisory | Before 1.10.3 · Fixed in 1.10.3 | affected |
Nuclei templates
1ProjectDiscoveryHIGHHoverfly < 1.10.3 - Arbitrary File ReadCVSS 7.5
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.
Impact
Unauthenticated attackers can read arbitrary files from the Hoverfly server including sensitive configuration data.
Remediation
Update Hoverfly to version 1.10.3 or later.
Source: ProjectDiscovery