Skip to main content

Mockoon CVE-2026-59149

| EUVDEUVD-2026-42684 MEDIUM
Path Traversal (CWE-22)
2026-07-09 GitHub_M GHSA-8wqc-v2q8-vff2
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Discover Mockoon instance with dynamic FILE route
  2. Delivery
    Craft request embedding path traversal payload
  3. Exploit
    Submit request via HTTP/WebSocket/callback
  4. Execution
    getSafeFilePath passes sibling-prefix bypass
  5. Persist
    Mockoon serves file via sendFile
  6. Impact
    Attacker 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 filePath value dynamically embeds inbound request data (such as a URL path segment, query parameter, or other request-derived variable). This is a deliberate configuration choice, not a default state. Without such a route, the vulnerable code path in getSafeFilePath is never reached and the vulnerability is not exploitable. Exploitation is further limited to files readable by the OS user running the Mockoon process. The CVSS UI:R metric reflects this operator-configuration prerequisite. Exploitation is not possible against Mockoon instances serving only static, hardcoded file paths in their FILE responses.

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 filePath dynamically embeds request-controlled data - a non-default but documented use case. Without this specific configuration, the attack surface does not exist, substantially narrowing real-world risk beyond what the network-accessible attack vector alone implies. No EPSS data was provided in the input. No CISA KEV listing confirms active exploitation, and no POC code is referenced in available data. The primary real-world risk is to developer or QA environments where Mockoon is exposed on a network interface with dynamic FILE routes configured. Production deployments using Mockoon as a backend proxy are a less common but more critical exposure. Overall, this is a genuine confidentiality threat in specific configurations but not a broad-sweep opportunistic exploitation risk at time of analysis.

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 ../mockdata-sibling/../../etc/hostname - that, after resolution, begins with the base directory string but resolves outside it. Mockoon's getSafeFilePath passes the prefix check, and the server returns the file contents via sendFile. No authentication or elevated privileges are required from the attacker's perspective; the precondition is solely the operator's route configuration.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

mockoon < 9.7.0

Affected Packages

npm @mockoon/cli fix: 9.7.0
npm @mockoon/commons-server fix: 9.7.0
euvd mockoon fix: 9.7.0

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

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

1
Patch available
Jul 09, 2026 - 20:01 EUVD

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3 npm packages depend on @mockoon/commons-server (3 direct, 0 indirect)

Ecosystem-wide dependent count for version 9.7.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Low
developer mock API tool, limited production network exposure
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy