CVE-2026-59149
MEDIUM 6.5CVSS 3.1@Mockoon/commons-server: Path traversal in templated `filePath` lets a request escape the served directory (prefix-only base check)
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
- 9 Jul 2026
- Last modified
- 11 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-22CWE-23
- Also known as
- GHSA-8wqc-v2q8-vff2
- Sources
- NVDJSONOSV GHSA-8wqc-v2q8-vff2JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | @mockoon/commons-server | < 9.7.0 | 9.7.0 |
| OSV | npm | @mockoon/cli | < 9.7.0 | 9.7.0 |
References
- https://github.com/mockoon/mockoon/commit/b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585 · WEB
- https://github.com/mockoon/mockoon/pull/2255 · WEB
- https://github.com/mockoon/mockoon/releases/tag/v9.7.0 · WEB
- https://github.com/mockoon/mockoon/security/advisories/GHSA-8wqc-v2q8-vff2 · WEB
- https://mockoon.com/releases/9.7.0 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-59149 · ADVISORY
- https://github.com/mockoon/mockoon · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 9 Jul 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 11 Sep 2026)