Mockoon: Path traversal in templated `filePath` lets a request escape the served directory (prefix-only base check)
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-22 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mockoon | mockoon | before 9.7.0 | 9.7.0 | Patch available | CNA |
| — | @mockoon/commons-server (npm) | before 9.7.0 | 9.7.0 | Patch available | GHSA-8wqc-v2q8-vff2 |
| — | @mockoon/cli (npm) | before 9.7.0 | 9.7.0 | Patch available | GHSA-8wqc-v2q8-vff2 |
- mockoon Vendormockoon Affected before 9.7.0 Fixed in 9.7.0 Patch available CNA
- @mockoon/commons-server (npm) Vendor— Affected before 9.7.0 Fixed in 9.7.0 Patch available GHSA-8wqc-v2q8-vff2
- @mockoon/cli (npm) Vendor— Affected before 9.7.0 Fixed in 9.7.0 Patch available GHSA-8wqc-v2q8-vff2
Remediation
- Fix · CNA mockoon (mockoon) Fixed in 9.7.0
- Fix · GHSA-8wqc-v2q8-vff2 @mockoon/commons-server (npm) Fixed in 9.7.0 Advisory →
- Fix · GHSA-8wqc-v2q8-vff2 @mockoon/cli (npm) Fixed in 9.7.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-59149
- 2026-10-03 Alias added: GHSA-8wqc-v2q8-vff2
References
Other 6
- https://github.com/mockoon/mockoon/security/advisories/GHSA-8wqc-v2q8-vff2
- https://github.com/mockoon/mockoon/pull/2255
- https://github.com/mockoon/mockoon/commit/b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585
- https://github.com/mockoon/mockoon/releases/tag/v9.7.0
- https://mockoon.com/releases/9.7.0
- https://github.com/mockoon/mockoon
More mockoon vulnerabilities
- TI-2026-42315 Mockoon: Unauthenticated admin API + wildcard CORS allows mock-state hijack and secret theft CVSS 3.1HIGH 8.8
- TI-2025-36691 Mockoon has a Path Traversal and LFI in the static file serving endpoint CVSS 3.1HIGH 7.5
Sources
- CVE-2026-59149 · CVE Program
- CVE-2026-59149 · NVD
- FIRST EPSS
- GHSA-8wqc-v2q8-vff2 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences