Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDiscover Mockoon instance with dynamic FILE route
-
DeliveryCraft request embedding path traversal payload
-
ExploitSubmit request via HTTP/WebSocket/callback
-
ExecutiongetSafeFilePath passes sibling-prefix bypass
-
PersistMockoon serves file via sendFile
-
ImpactAttacker reads out-of-bounds file contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the targeted Mockoon instance has at least one FILE response type route configured where the |
| Impact | The NVD-assigned CVSS 3.1 score of 6.5 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N) reflects high confidentiality impact but scoped scope and required user interaction. The UI:R metric is critical context: exploitation requires the Mockoon operator to have configured a FILE response route where |
| Exploit ScenarioDerived | An attacker identifies a running Mockoon instance (e.g., exposed on a development or CI network) that has a FILE response route configured to serve files using a request-controlled path parameter. The attacker sends an HTTP request with a crafted path value - such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
Path traversal in Mockoon prior to 9.7.0 allows unauthenticated network clients to read arbitrary files from sibling paths outside the configured static serving directory. The vulnerability exists in the getSafeFilePath function in packages/commons-server/src/libs/server/server.ts, which enforces directory confinement using a bare string-prefix check (resolvedPath.startsWith(staticBaseDir)) without a path-separator boundary. Because any path whose absolute form begins with the base directory string - including sibling directories sharing a common prefix - passes this check, crafted ../-escaped values embedded in request data can escape the sandbox across HTTP sendFile, WebSocket, and callback channels. No public exploit code identified at time of analysis and no CISA KEV listing.
RemediationAI
Upgrade Mockoon to version 9.7.0, which is confirmed as the vendor-released fix per the GitHub release at https://github.com/mockoon/mockoon/releases/tag/v9.7.0 and the advisory at https://github.com/mockoon/mockoon/security/advisories/GHSA-8wqc-v2q8-vff2. The upstream fix is tracked in pull request https://github.com/mockoon/mockoon/pull/2255 and commit b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585. If immediate upgrade is not possible, disable any FILE response routes whose filePath value incorporates request-derived data (path parameters, query strings, headers) - static file paths are not affected. As an additional compensating control, restrict network access to the Mockoon server to trusted IP ranges only, preventing unauthenticated external clients from reaching the vulnerable endpoint. Both workarounds carry the trade-off of reducing Mockoon's core dynamic file-serving functionality.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Mockoon (CPE: cpe:2.3:a:mockoon:mockoon:*:*:*:*:*:*:*:*) is a developer-oriented tool for designing and running local mock APIs. It supports FILE response types where filePath can dynamically incorporate inbound request data such as path parameters or query strings. The server enforces a sandbox via getSafeFilePath in packages/commons-server/src/libs/server/server.ts using the pattern resolvedPath.startsWith(staticBaseDir). This check is vulnerable to CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) because String.prototype.startsWith performs character-by-character matching with no awareness of filesystem path separators. Concretely, if staticBaseDir is /app/mockdata, a resolved path of /app/mockdata-secrets/config.json - reachable via a ../-escaped traversal through a sibling directory - passes the prefix check, since that string does begin with /app/mockdata. The Node.js http.sendFile mechanism then serves the file to the requesting client.
Know when Mockoon gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
UI:R reflects the operator must configure dynamic FILE routes; AV:N and PR:N because the attacker requires no credentials; C:H for arbitrary file read; I:N and A:N since no write or denial capability exists.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 3 npm packages depend on @mockoon/commons-server (3 direct, 0 indirect)
Ecosystem-wide dependent count for version 9.7.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-42684
GHSA-8wqc-v2q8-vff2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB