CVE-2024-45388
Hoverfly vulnerability
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 products
Hoverfly. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Hoverfly runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/SpectoLabs/hoverfly/security/advisories/GHSA-6xx4-x46f-f897 · Exploit
- codeql.github.com/codeql-query-help/go/go-path-injection
- github.com/SpectoLabs/hoverfly/releases/tag/v1.10.3
- github.com/spectolabs/hoverfly/blob/15d6ee9ea4e0de67aec5a41c28d21dc147243da0/core/handlers
- nvd.nist.gov/vuln/detail/CVE-2024-45388
- github.com/advisories/GHSA-6xx4-x46f-f897
- nvd.nist.gov/vuln/detail/CVE-2024-45388
- cve.org/CVERecord?id=CVE-2024-45388
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.