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 a client to supply a templated filePath in a FILE response. The validation routine checks only that the resolved path starts with the configured static base directory, without enforcing a path‑separator boundary. Consequently, a request can include "../" segments that resolve to a file outside the intended directory while still matching the prefix test. An unauthenticated attacker can then retrieve that file through the standard HTTP sendFile, WebSocket, or callback mechanisms, exposing configuration files, logs, or other sensitive data. The flaw does not provide code execution or privilege escalation; it only compromises confidentiality of arbitrary files.

Affected Systems

Affected systems: All installations of Mockoon that use a templated filePath response prior to the release of version 9.7.0 are vulnerable. The vulnerability applies to any operating system and any server configuration that exposes the Mockoon mock API, regardless of network placement.

Risk and Exploitability

Risk and exploitability: The CVSS score of 6.5 indicates a medium severity issue. The EPSS score of <1% suggests a very low probability of exploitation in the wild, but because the flaw permits unauthenticated remote access to arbitrary files, it remains of 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 August 1, 2026 at 14:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mockoon to version 9.7.0 or later, where getSafeFilePath correctly enforces a 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 the vulnerability from being exercised.
  • Apply network segmentation or firewall rules to restrict external access to the Mockoon service and monitor logs for unexpected file access attempts.

Generated by OpenCVE AI on August 1, 2026 at 14:08 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

Status : Deferred

Published: 2026-07-09T19:17:07.207

Modified: 2026-07-10T19:15:15.780

Link: CVE-2026-59149

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T14:15:03Z

Weaknesses
  • CWE-22

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

  • CWE-23

    Relative Path Traversal