cve-2024-45388

HIGH CVSS 7.5 opencve
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.

Timeline
Published
2024-09-02 18:15 UTC
Last Modified
2026-06-17
CVSS Details

CVSS details not available.

Affected Products

No product information available.

Weaknesses (CWE)
CVSS metrics
Version Base Severity Vector Exploitability Impact Source
3.1 7.5 HIGH CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N mitre
3.1 7.5 HIGH CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N nvd
3.1 7.5 HIGH CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N opencve
References

No references available.

Linked Vulnerabilities

No linked vulnerabilities found.

{
  "advisories": [
    {
      "id": "GHSA-6xx4-x46f-f897",
      "source": "ghsa",
      "title": "Hoverfly allows an arbitrary file read in the `/api/v2/simulation` endpoint (`GHSL-2023-274`)",
      "url": "https://github.com/advisories/GHSA-6xx4-x46f-f897"
    }
  ],
  "cve": "CVE-2024-45388",
  "epss": {
    "score": 0.55574
  },
  "mitre": {
    "cpes": [],
    "created": "2024-09-02T16:07:17.599000+00:00",
    "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.",
    "metrics": {
      "cvssV2_0": {},
      "cvssV3_0": {},
      "cvssV3_1": {
        "score": 7.5,
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
      },
      "cvssV4_0": {}
    },
    "mitre_repo_path": "cves/2024/45xxx/CVE-2024-45388.json",
    "references": [
      "https://codeql.github.com/codeql-query-help/go/go-path-injection",
      "https://github.com/SpectoLabs/hoverfly/releases/tag/v1.10.3",
      "https://github.com/SpectoLabs/hoverfly/security/advisories/GHSA-6xx4-x46f-f897",
      "https://github.com/spectolabs/hoverfly/blob/15d6ee9ea4e0de67aec5a41c28d21dc147243da0/core/handlers/v2/simulation_handler.go#L87"
    ],
    "title": "Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)",
    "updated": "2024-09-03T14:22:12.634000+00:00",
    "vendors": [],
    "weaknesses": [
      "CWE-200"
    ]
  },
  "nvd": {
    "cpes": [
      "cpe:2.3:a:hoverfly:hoverfly:*:*:*:*:*:*:*:*"
    ],
    "created": "2024-09-02T18:15:38.063000+00:00",
    "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.",
    "metrics": {
      "cvssV2_0": {},
      "cvssV3_0": {},
      "cvssV3_1": {
        "score": 7.5,
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
      },
      "cvssV4_0": {}
    },
    "nvd_repo_path": "2024/CVE-2024-45388.json",
    "references": [
      "https://codeql.github.com/codeql-query-help/go/go-path-injection",
      "https://github.com/SpectoLabs/hoverfly/releases/tag/v1.10.3",
      "https://github.com/SpectoLabs/hoverfly/security/advisories/GHSA-6xx4-x46f-f897",
      "https://github.com/spectolabs/hoverfly/blob/15d6ee9ea4e0de67aec5a41c28d21dc147243da0/core/handlers/v2/simulation_handler.go#L87"
    ],
    "title": null,
    "updated": "2026-06-17T07:54:07.090000+00:00",
    "vendors": [
      "hoverfly",
      "hoverfly$PRODUCT$hoverfly"
    ],
    "weaknesses": [
      "CWE-200",
      "CWE-22"
    ]
  },
  "opencve": {
    "changes": [
      {
        "created": "2024-09-02T16:30:00+00:00",
        "data": [
          {
            "details": {
              "new": "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.",
              "old": null
            },
            "type": "description"
          },
          {
            "details": {
              "new": "Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)",
              "old": null
            },
            "type": "title"
          },
          {
            "details": {
              "added": [
                "CWE-200"
              ],
              "removed": []
            },
            "type": "weaknesses"
          },
          {
            "details": {
              "added": [
                "https://codeql.github.com/codeql-query-help/go/go-path-injection",
                "https://github.com/SpectoLabs/hoverfly/releases/tag/v1.10.3",
                "https://github.com/SpectoLabs/hoverfly/security/advisories/GHSA-6xx4-x46f-f897",
                "https://github.com/spectolabs/hoverfly/blob/15d6ee9ea4e0de67aec5a41c28d21dc147243da0/core/handlers/v2/simulation_handler.go#L87"
              ],
              "removed": []
            },
            "type": "references"
          },
          {
            "details": {
              "added": {
                "cvssV3_1": {
                  "score": 7.5,
                  "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
                }
              },
              "removed": {},
              "updated": {}
            },
            "type": "metrics"
          }
        ],
        "id": "de0ad3d6-17d7-40fd-93e3-0db6b8bb32bd"
      },
      {
        "created": "2024-09-03T15:30:00+00:00",
        "data": [
          {
            "details": [
              "spectolabs",
              "spectolabs$PRODUCT$hoverfly"
            ],
            "type": "first_time"
          },
          {
            "details": {
              "added": [
                "cpe:2.3:a:spectolabs:hoverfly:*:*:*:*:*:*:*:*"
              ],
              "removed": []
            },
            "type": "cpes"
          },
          {
            "details": {
              "added": [
                "spectolabs",
                "spectolabs$PRODUCT$hoverfly"
              ],
              "removed": []
            },
            "type": "vendors"
          },
          {
            "details": {
              "added": {
                "ssvc": {
                  "options": {
                    "Automatable": "yes",
                    "Exploitation": "poc",
                    "Technical Impact": "partial"
                  },
                  "version": "2.0.3"
                }
              },
              "removed": {},
              "updated": {}
            },
            "type": "metrics"
          }
        ],
        "id": "65df2187-8dd6-497c-a495-b9de571ff214"
      },
      {
        "created": "2024-09-19T15:45:00+00:00",
        "data": [
          {
            "details": [
              "hoverfly",
              "hoverfly$PRODUCT$hoverfly"
            ],
            "type": "first_time"
          },
          {
            "details": {
              "added": [
                "CWE-22"
              ],
              "removed": []
            },
            "type": "weaknesses"
          },
          {
            "details": {
              "added": [
                "cpe:2.3:a:hoverfly:hoverfly:*:*:*:*:*:*:*:*"
              ],
              "removed": []
            },
            "type": "cpes"
          },
          {
            "details": {
              "added": [
                "hoverfly",
                "hoverfly$PRODUCT$hoverfly"
              ],
              "removed": []
            },
            "type": "vendors"
          }
        ],
        "id": "9d87077f-bd4b-49c1-9631-4d37a7ce7bac"
      }
    ],
    "cpes": {
      "data": [
        "cpe:2.3:a:hoverfly:hoverfly:*:*:*:*:*:*:*:*",
        "cpe:2.3:a:spectolabs:hoverfly:*:*:*:*:*:*:*:*"
      ],
      "providers": [
        "nvd",
        "vulnrichment"
      ]
    },
    "created": {
      "data": "2024-09-02T16:07:17.599000+00:00",
      "provider": "mitre"
    },
    "description": {
      "data": "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.",
      "provider": "mitre"
    },
    "metrics": {
      "cvssV2_0": {
        "data": {},
        "provider": null
      },
      "cvssV3_0": {
        "data": {},
        "provider": null
      },
      "cvssV3_1": {
        "data": {
          "score": 7.5,
          "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        },
        "provider": "mitre"
      },
      "cvssV4_0": {
        "data": {},
        "provider": null
      },
      "epss": {
        "data": {
          "score": 0.55574
        },
        "provider": "first"
      },
      "kev": {
        "data": {},
        "provider": null
      },
      "ssvc": {
        "data": {
          "options": {
            "Automatable": "yes",
            "Exploitation": "poc",
            "Technical Impact": "partial"
          },
          "version": "2.0.3"
        },
        "provider": "vulnrichment"
      },
      "threat_severity": {
        "data": null,
        "provider": null
      }
    },
    "references": {
      "data": [
        "https://codeql.github.com/codeql-query-help/go/go-path-injection",
        "https://github.com/SpectoLabs/hoverfly/releases/tag/v1.10.3",
        "https://github.com/SpectoLabs/hoverfly/security/advisories/GHSA-6xx4-x46f-f897",
        "https://github.com/spectolabs/hoverfly/blob/15d6ee9ea4e0de67aec5a41c28d21dc147243da0/core/handlers/v2/simulation_handler.go#L87"
      ],
      "providers": [
        "mitre",
        "nvd"
      ]
    },
    "title": {
      "data": "Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)",
      "provider": "mitre"
    },
    "updated": {
      "data": "2024-09-19T15:18:32.007000+00:00",
      "provider": "nvd"
    },
    "vendors": {
      "data": [
        "hoverfly",
        "hoverfly$PRODUCT$hoverfly",
        "spectolabs",
        "spectolabs$PRODUCT$hoverfly"
      ],
      "providers": [
        "nvd",
        "vulnrichment"
      ]
    },
    "weaknesses": {
      "data": [
        "CWE-200",
        "CWE-22"
      ],
      "providers": [
        "mitre",
        "nvd"
      ]
    }
  },
  "vulnrichment": {
    "cpes": [
      "cpe:2.3:a:spectolabs:hoverfly:*:*:*:*:*:*:*:*"
    ],
    "created": "2024-09-02T16:07:17.599000+00:00",
    "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.",
    "metrics": {
      "cvssV2_0": {},
      "cvssV3_0": {},
      "cvssV3_1": {},
      "cvssV4_0": {},
      "kev": {},
      "ssvc": {
        "options": {
          "Automatable": "yes",
          "Exploitation": "poc",
          "Technical Impact": "partial"
        },
        "version": "2.0.3"
      }
    },
    "references": [],
    "title": "Arbitrary file read in the `/api/v2/simulation` endpoint in hoverfly (`GHSL-2023-274`)",
    "updated": "2024-09-03T14:22:04.493000+00:00",
    "vendors": [
      "spectolabs",
      "spectolabs$PRODUCT$hoverfly"
    ],
    "vulnrichment_repo_path": "2024/45xxx/CVE-2024-45388.json",
    "weaknesses": []
  }
}
Enrichment data
View JSON API Download JSON