Description
Mockoon provides way to design and run mock APIs. Prior to 9.7.0, a FILE response whose filePath embeds request data is confined by getSafeFilePath in packages/commons-server/src/libs/server/server.ts with resolvedPath.startsWith(staticBaseDir). That prefix test has no path-separator boundary, so a ../-escaped path whose absolute form string-prefixes the base directory passes, allowing an unauthenticated client to read files from sibling paths outside the served directory through HTTP sendFile, WebSocket, or callbacks. This issue is fixed in version 9.7.0.
Published: 2026-07-09
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mockoon allows an attacker to include a filePath in a FILE response that that the resolved path starts with the static base directory, but it does not enforce a path‑separator boundary. As a result a constructed path containing ../ segments can resolve to a file An unauthenticated client can then retrieve that file through HTTP sendFile, WebSocket, or callback handlers, exposing configuration, logs or other sensitive files. The vulnerability does not provide code execution or privilege escalation, but it does compromise the confidentiality of arbitrary files within sibling directories.

Affected Systems

The flaw exists in all Mockoon installations that use templatized filePath responses prior to version 9.7.0. All servers running Mockoon 9.6 and earlier are affected regardless of operating system.

Risk and Exploitability

The CVSS score of 6.5 indicates a medium severity vulnerability. The EPSS score of <1% indicates a very low exploitation probability, but because the flaw allows unauthenticated remote access to arbitrary files, it remains a concern for exposed services. The vulnerability is not listed in CISA KEV and no public exploit has been documented. The likely attack vector is remote over the normal HTTP or WebSocket ports that Mockoon exposes.

Generated by OpenCVE AI on July 26, 2026 at 14:57 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mockoon to version 9.7.0 or later, where getSafeFilePath is corrected to enforce a proper path‑separator boundary.
  • If an upgrade is not immediately feasible, disable templated filePath responses or remove the file response endpoint from publicly exposed APIs to prevent attackers from triggering the check.
  • Implement network segmentation or firewall rules to restrict access to the Mock and monitor logs for unexpected file access patterns.

Generated by OpenCVE AI on July 26, 2026 at 14:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 09 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Mockoon
Mockoon mockoon
Vendors & Products Mockoon
Mockoon mockoon

Thu, 09 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 09 Jul 2026 18:45:00 +0000

Type Values Removed Values Added
Description Mockoon provides way to design and run mock APIs. Prior to 9.7.0, a FILE response whose filePath embeds request data is confined by getSafeFilePath in packages/commons-server/src/libs/server/server.ts with resolvedPath.startsWith(staticBaseDir). That prefix test has no path-separator boundary, so a ../-escaped path whose absolute form string-prefixes the base directory passes, allowing an unauthenticated client to read files from sibling paths outside the served directory through HTTP sendFile, WebSocket, or callbacks. This issue is fixed in version 9.7.0.
Title Mockoon: Path traversal in templated `filePath` lets a request escape the served directory (prefix-only base check)
Weaknesses CWE-22
CWE-23
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T18:41:45.833Z

Reserved: 2026-07-02T16:50:27.886Z

Link: CVE-2026-59149

cve-icon Vulnrichment

Updated: 2026-07-09T18:41:12.461Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T15:00:05Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-23

    Relative Path Traversal