{"answers":{"affected":"4 open source packages ship an affected version, including @mockoon/cli and @mockoon/commons-server.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59149 exists.","fix":"Upgrade @mockoon/cli to 9.7.0 or later.","what":"CVE-2026-59149 is a medium-severity path traversal vulnerability in mockoon, published on 9 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-59149 and fix it if it is affected.\n\nWhat it is: CVE-2026-59149 is a medium-severity path traversal vulnerability in mockoon, published on 9 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59149 exists.\n\nAffected packages and fixed versions:\n- @mockoon/cli (npm): affected all versions; fixed in 9.7.0\n- @mockoon/cli (npm): affected all versions; fixed in 9.7.0\n- @mockoon/commons-server (npm): affected all versions; fixed in 9.7.0\n- @mockoon/commons-server (npm): affected all versions; fixed in 9.7.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-59149/ (Markdown: https://insights.sbomify.com/CVE-2026-59149/index.md)","id":"CVE-2026-59149","markdown":"https://insights.sbomify.com/CVE-2026-59149/index.md","name":"CVE-2026-59149","record":{"aliases":["GHSA-8wqc-v2q8-vff2"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Mockoon API mocking tool","requires_auth":"none","summary":"An unauthenticated attacker can read files outside the served directory in Mockoon due to a flawed path validation check.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Mockoon: Path traversal in templated `filePath` lets a request escape the served directory (prefix-only base check)","id":"CVE-2026-59149","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":4,"n_references":5,"next":{"headline":"Prowler: SAML Domain Claiming Enables Cross-Tenant Account Takeover","id":"CVE-2026-59151"},"packages":[{"ecosystem":"npm","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"@mockoon/cli","purl":null,"source":"GHSA-8wqc-v2q8-vff2"},{"ecosystem":"npm","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"@mockoon/cli","purl":"pkg:npm/%40mockoon/cli","source":"GHSA-8wqc-v2q8-vff2"},{"ecosystem":"npm","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"@mockoon/commons-server","purl":null,"source":"GHSA-8wqc-v2q8-vff2"},{"ecosystem":"npm","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"@mockoon/commons-server","purl":"pkg:npm/%40mockoon/commons-server","source":"GHSA-8wqc-v2q8-vff2"}],"prev":{"headline":"Mockoon: Unauthenticated admin API + wildcard CORS allows mock-state hijack and secret theft","id":"CVE-2026-59148"},"products":["mockoon"],"published":"2026-07-09","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-09","vendors":["mockoon"]},"summary":"An unauthenticated attacker can read files outside the served directory in Mockoon due to a flawed path validation check.","url":"https://insights.sbomify.com/CVE-2026-59149/"}