CVE-2026-59149: @Mockoon/commons-server: Path traversal in templated `filePath` lets a request escape the served directory (prefix-only base check)
A FILE response whose filePath embeds request data (e.g. "/srv/public/{{queryParam 'name'}}", the documented way to let the client pick a file) is confined by getSafeFilePath 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. An unauthenticated client reads files from sibling paths outside the served directory.
References
- github.com/advisories/GHSA-8wqc-v2q8-vff2
- github.com/mockoon/mockoon/commit/b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585
- github.com/mockoon/mockoon/pull/2255
- github.com/mockoon/mockoon/releases/tag/v9.7.0
- github.com/mockoon/mockoon/security/advisories/GHSA-8wqc-v2q8-vff2
- mockoon.com/releases/9.7.0
- nvd.nist.gov/vuln/detail/CVE-2026-59149
Code Behaviors & Features
Detect and mitigate CVE-2026-59149 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →