CVE-2025-59049
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-59049 affects Mockoon, a tool for designing and running mock APIs. Prior to version 9.2.0, the mock API configuration for static file serving was vulnerable to Path Traversal and Local File Inclusion (LFI) attacks. The vulnerability was discovered and disclosed on March 11, 2025, affecting all versions up to 9.1.0 of @mockoon/cli and @mockoon/commons-server packages (GitHub Advisory).

Technical details

The vulnerability exists in the server filename generation process via templating features from user input. Specifically, in the sendFileWithCallback(code) and sendFile(code) functions, the filePath variable is parsed using TemplateParser without proper path sanitization. The CVSS v3.1 score is 7.5 (High), with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, indicating network accessibility, low attack complexity, and no required privileges or user interaction (GitHub Advisory).

Impact

The vulnerability allows an attacker to access any file in the mock server filesystem through path traversal techniques. This issue is particularly critical in cloud-hosted server instances where sensitive files could be exposed. The vulnerability primarily affects confidentiality, allowing unauthorized access to files outside the intended directory structure (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 9.2.0 of the affected packages. Users should upgrade to this version or later to protect against path traversal and LFI attacks. The fix includes proper path sanitization and validation of user input used in file path generation (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59041HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-58764HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-59049HIGH7.5
  • JavaScriptJavaScript
  • @mockoon/commons-server
NoYesSep 10, 2025
CVE-2025-59052HIGH7.1
  • JavaScriptJavaScript
  • @nguniversal/common
NoYesSep 10, 2025
CVE-2025-57520LOW2.1
  • JavaScriptJavaScript
  • decap-cms
NoNoSep 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management