The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59049

CVE-2025-59049: Mockoon Path Traversal Vulnerability

CVE-2025-59049 is a path traversal flaw in Mockoon's static file serving that allows attackers to access any file on the mock server filesystem. This article covers the technical details, affected versions, and mitigation.

Published: April 15, 2026

CVE-2025-59049 Overview

CVE-2025-59049 is a Path Traversal and Local File Inclusion (LFI) vulnerability discovered in Mockoon, a popular tool for designing and running mock APIs. Prior to version 9.2.0, the mock API configuration for static file serving contained a critical flaw where server filenames are generated via templating features from user input without proper sanitization. This allows an attacker to traverse directory paths and access any file on the mock server filesystem.

Critical Impact

Attackers can read arbitrary files from the server filesystem, potentially exposing sensitive configuration files, credentials, source code, and other confidential data. This is particularly dangerous for cloud-hosted Mockoon server instances.

Affected Products

  • Mockoon versions prior to 9.2.0
  • Mockoon commons-server package (static file serving functionality)
  • Mockoon serverless deployments

Discovery Timeline

  • 2025-09-10 - CVE-2025-59049 published to NVD
  • 2025-09-11 - Last updated in NVD database

Technical Details for CVE-2025-59049

Vulnerability Analysis

This vulnerability exists in Mockoon's static file serving functionality within the commons-server package. The application follows a templating approach for generating server filenames based on user input, as documented in Mockoon's official documentation. However, the implementation fails to properly validate and sanitize file path inputs, creating a classic Path Traversal weakness (CWE-22).

When processing requests for static files, the server concatenates user-controlled path segments without adequately filtering directory traversal sequences such as ../. This allows attackers to escape the intended web root directory and access files anywhere on the filesystem that the Mockoon process has read permissions for.

The vulnerability is particularly concerning for cloud-hosted instances where Mockoon servers may have access to sensitive cloud credentials, environment variables, or configuration files that could enable lateral movement or further compromise.

Root Cause

The root cause lies in the improper handling of the environmentDirectory parameter and file path resolution in the server code. The vulnerable code in packages/commons-server/src/libs/server/server.ts processes file serving requests without implementing proper path canonicalization or traversal filtering.

The security patch addressed this by making the environmentDirectory field required rather than optional, ensuring proper path validation is enforced:

typescript
   /**
    * Directory where to find the environment file.
    */
-  environmentDirectory?: string;
+  environmentDirectory: string;
 
   /**
    * List of routes uuids to disable.

Source: GitHub Commit Details

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by crafting HTTP requests to a Mockoon mock API endpoint that serves static files, including path traversal sequences in the request to access files outside the intended directory.

For example, an attacker could request files like /etc/passwd, /etc/shadow, or cloud provider metadata endpoints by manipulating the file path parameter with sequences like ../../../etc/passwd. The vulnerability allows reading any file accessible to the Mockoon process user context.

The serverless deployment configuration was also updated to address the vulnerability:

typescript
 import ServerlessHttp from 'serverless-http';
 
 export class MockoonServerless {
-  private options: ServerOptions & { logTransaction: boolean } = {
+  private options: Partial<ServerOptions> & { logTransaction: boolean } = {
     logTransaction: false,
     disabledRoutes: [],
     fakerOptions: {},

Source: GitHub Commit Details

Detection Methods for CVE-2025-59049

Indicators of Compromise

  • HTTP requests to Mockoon endpoints containing path traversal sequences (../, ..%2f, %2e%2e/)
  • Access logs showing requests for sensitive system files like /etc/passwd, /etc/shadow, or Windows system files
  • Requests attempting to access cloud metadata endpoints (e.g., 169.254.169.254)
  • Unusual file access patterns in Mockoon server logs indicating filesystem enumeration

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block path traversal patterns in request URLs
  • Monitor application logs for requests containing encoded or decoded traversal sequences
  • Deploy file integrity monitoring on sensitive system files to detect unauthorized read access
  • Configure intrusion detection systems to alert on LFI attack signatures targeting Node.js applications

Monitoring Recommendations

  • Enable verbose logging on Mockoon instances to capture full request paths
  • Aggregate and analyze logs from cloud-hosted Mockoon servers for anomalous file access patterns
  • Set up alerts for requests that match path traversal regex patterns
  • Monitor outbound network connections from Mockoon servers that may indicate data exfiltration

How to Mitigate CVE-2025-59049

Immediate Actions Required

  • Upgrade all Mockoon installations to version 9.2.0 or later immediately
  • Audit access logs for any prior exploitation attempts using path traversal patterns
  • Review and restrict filesystem permissions for the Mockoon process user
  • Implement network segmentation to limit access to sensitive files from Mockoon servers

Patch Information

The vulnerability has been fixed in Mockoon version 9.2.0. The patch commit c7f6e23e87dc3b8cc44e5802af046200a797bd2e addresses the path traversal issue by enforcing proper path validation and making the environmentDirectory field required. Users should update via their package manager:

bash
# Update Mockoon CLI
npm update @mockoon/cli

# Update Mockoon serverless package
npm update @mockoon/serverless

For additional details, refer to the GitHub Security Advisory.

Workarounds

  • Place Mockoon servers behind a reverse proxy with path traversal filtering enabled
  • Restrict network access to Mockoon instances to trusted IP ranges only
  • Run Mockoon in a containerized environment with a minimal filesystem and no sensitive files accessible
  • Implement application-level input validation if custom middleware is being used with Mockoon
bash
# Example: Run Mockoon in Docker with restricted filesystem access
docker run -d \
  --read-only \
  --tmpfs /tmp \
  -v /path/to/mock/data:/data:ro \
  -p 3000:3000 \
  mockoon/cli:latest \
  --data /data/mock.json

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechMockoon

  • SeverityHIGH

  • CVSS Score7.5

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Code Snippet

  • GitHub Code Snippet

  • GitHub Commit Details

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-8468: Elixir Plug Library DoS Vulnerability

  • CVE-2026-8295: simdjson Information Disclosure Vulnerability

  • CVE-2025-68421: Comarch ERP Optima Auth Bypass Vulnerability

  • CVE-2025-68420: Comarch ERP Optima Privilege Escalation
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English