CVE-2025-59049: Mockoon path traversal and local file inclusion in static file serving

CVE-2025-59049 · Severity: low · CVSS 3.1 · Published 2025-03-11

Mockoon is a mock API server tool that allows developers to simulate backend services for testing. Its static file serving feature is vulnerable to path traversal attacks, allowing an attacker to read arbitrary files from the server's filesystem, including sensitive system files like /etc/passwd. This could expose configuration files, credentials, or other sensitive data stored on the server.

Technologies: Mockoon Commons-Server. Vendors: Mockoon.

Quick answers

Is CVE-2025-59049 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-59049 being exploited in the wild.
How severe is CVE-2025-59049?
Low severity, with a CVSS score of 3.1, published 11 March 2025.
Which products and versions are affected?
Mockoon Commons-Server <=9.1.0.
Is there a fix for CVE-2025-59049?
A patch was published on 2025-03-11: Fixed in version 9.2.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-59049 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-59049?
Check whether you run Mockoon Commons-Server at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a path traversal and local file inclusion (LFI) flaw in the sendFileWithCallback and sendFile functions. The vulnerable code parses user-supplied request parameters (e.g., query parameters) through a template parser without properly sanitizing path traversal sequences like "../". An attacker can craft requests with URL-encoded traversal sequences (e.g., %2F..%2F..%2Fetc%2Fpasswd) to navigate outside the intended static files directory and read arbitrary files on the server filesystem. No authentication or user interaction is required; the attack is exploitable directly over the network. The vulnerability affects versions up to 9.1.0 of @mockoon/commons-server and @mockoon/cli, with a fix available in version 9.2.0.

Affected products

  • Mockoon commons-server <=9.1.0
  • Mockoon cli <=9.1.0

Identifiers

  • CVE-2025-59049
  • GHSA-w7f9-wqc4-3wxr

Timeline

  • 2025-03-11: disclosed
  • 2025-03-11: patched: Fixed in version 9.2.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.