CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-59149

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 12, 2026·5 min read·20 visits

Executive Summary (TL;DR)

A path traversal vulnerability in Mockoon's backend server allows unauthenticated clients to read files from sibling directories outside the configured base directory by exploiting character-by-character prefix validation.

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Vulnerability Overview

CVE-2026-59149 represents a path traversal vulnerability in @mockoon/commons-server, the underlying backend engine for Mockoon. Mockoon is an open-source development tool designed to configure, run, and scale local mock APIs. When Mockoon is configured to serve static assets or process dynamic file-serving endpoints, it executes verification routines to restrict file requests to predefined target directories.\n\nThe verification system fails to properly restrict the target filesystem scope. An unauthenticated network adversary can bypass path verification and gain read access to files outside of the configured root directory. The root cause resides in character-level prefix comparison logic that fails to enforce directory-boundary separation.\n\nThis vulnerability primarily impacts developers and automated environments running Mockoon inside local development hosts or shared integration servers. Compromise of the local filesystem can leak sensitive metadata, application code, environment assets, or configuration keys stored in sibling workspace folders.

Root Cause Analysis

The path containment vulnerability resides in the validation check defined within packages/commons-server/src/libs/server/server.ts under the helper method getSafeFilePath. This method checks if the requested path remains confined within the static directory boundaries.\n\nPrior to version 9.7.0, the validation relied on the JavaScript String.prototype.startsWith() function to check if the target destination resolved path had the correct folder prefix. This string prefix check did not append directory separators or perform semantic path segment checks before evaluating containment.\n\nBecause of this lack of boundary checking, paths that share character prefixes can pass validation. For instance, if the configured directory path is /srv/public and the resolved file path is /srv/public_backup/secret.json, the validation step evaluates '/srv/public_backup/secret.json'.startsWith('/srv/public') as true. This allows the system to read and return files from sibling directories that begin with the same string prefix, bypassing intended directory boundaries.

Code Analysis

Before the patch in version 9.7.0, getSafeFilePath verified both absolute and relative file paths as follows:\n\ntypescript\nif (isPathAbsolute) {\n if (!staticBaseDir || !resolvedPath.startsWith(staticBaseDir)) {\n throw new Error(\n 'Access to absolute path outside of the original static base directory'\n );\n }\n} else {\n if (!resolvedPath.startsWith(this.options.environmentDirectory)) {\n throw new Error(\n 'Access to relative path outside of the environment base directory'\n );\n }\n}\n\n\nThe official remediation in commit b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585 introduced a secure containment evaluation method isPathInsideBase utilizing Node.js's native path.relative function:\n\ntypescript\nconst isPathInsideBase = (basePath: string, candidatePath: string) => {\n const relativePath = relative(basePath, candidatePath);\n return (\n relativePath === '' ||\n (!relativePath.startsWith('..') && !isAbsolute(relativePath))\n );\n};\n\n\nBy resolving the relative distance from basePath to candidatePath, the function checks if the candidate path steps out of the parent structure. If the calculated relative path contains the upward traversal prefix .., the system correctly flags and blocks the request.

Exploitation Methodology

Exploiting this path traversal relies on configuring or targeting a Mockoon endpoint with a response type set to FILE where the path uses a dynamic helper, such as {{queryParam 'file'}} or {{urlParam 'file'}}. The presence of dynamic template components allows remote client control over the file lookup string.\n\nAn attacker identifies an active file retrieval route and submits a query string containing traversal operators targeted at sibling folders, such as ?file=../../app_backup/.env. The application resolves the input relative to the mock application directory.\n\nThe resolved absolute location is evaluated against the validation engine. Because the sibling folder name starts with the prefix of the base folder, the prefix validation returns true, allowing the backend file service to open, read, and return the sensitive data to the network client.\n\nmermaid\ngraph LR\n A["Client Input (Traversal Payload)"] --> B["Path Resolution (Node.js)"]\n B --> C["Validate Path in getSafeFilePath()"]\n C --> D{"path.relative Check"}\n D -- "Begins with '..'" --> E["Throw Access Error"]\n D -- "Contained within Base" --> F["Read & Serve File Content"]\n

Impact Assessment

The potential impact of CVE-2026-59149 is marked as CVSS 6.5 (Medium). The exploit allows unauthorized, unauthenticated reading of data directly from the host filesystem in environments running the Mockoon server backend.\n\nDepending on the system layout, attackers can read private workspace configuration files, source code, database passwords, or operational credentials located in adjacent directories sharing the prefix name. This vulnerability is especially critical if Mockoon is deployed inside continuous integration (CI) environments or shared testing infrastructure.\n\nBecause this vulnerability does not allow modification of file contents or remote code execution directly, the scope is unchanged, and integrity is not directly compromised. However, the exfiltrated sensitive files often facilitate escalation paths in overall system deployment infrastructure.

Remediation and Defense

Remediation requires upgrading the Mockoon client, the command-line engine, or the underlying @mockoon/commons-server package to version 9.7.0 or higher. Version 9.7.0 successfully implements a robust boundary verification engine that rejects sibling folder containment bypasses.\n\nIf upgrading cannot be executed immediately, administrators must implement compensating controls:\n\n1. Audit active Mockoon mock setups and remove any FILE responses configured with dynamic template variable components.\n\n2. Introduce reverse proxies or security filters to strip directory traversal characters (e.g. ../ and corresponding URL encodings) from request paths.\n\n3. Run Mockoon under containerized or highly restricted execution boundaries with standard non-root service accounts, ensuring the host mount volumes do not expose sibling project configurations.

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
EPSS Probability
0.48%
Top 60% most exploited

Affected Systems

Mockoon Desktop ApplicationMockoon CLI@mockoon/commons-server npm package

Affected Versions Detail

Product
Affected Versions
Fixed Version
mockoon
Mockoon
< 9.7.09.7.0
@mockoon/commons-server
Mockoon
< 9.7.09.7.0
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS v3.1 Score6.5
EPSS Score0.00483 (0.48%)
ImpactConfidentiality (High)
Exploit StatusProof of Concept / Public Details Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

References & Sources

  • [1]GitHub Security Advisory GHSA-8wqc-v2q8-vff2
  • [2]Mockoon Fix Commit b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585
  • [3]Mockoon Pull Request 2255
  • [4]Mockoon Release Tag v9.7.0
  • [5]Mockoon v9.7.0 Official Release Notes

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-115895
8.8

CVE-2026-115895: Code Injection via Unsanitized Import Alias in Happy DOM ECMAScript Module Compiler

CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.

Amit Schendel
Amit Schendel
8 views•10 min read
•2 days ago•CVE-2026-115883
6.0

CVE-2026-115883: Cross-Namespace Access via Dot-Delimited Labels in LangGraph Postgres and SQLite Stores

An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.

Amit Schendel
Amit Schendel
8 views•9 min read
•2 days ago•CVE-2026-115886
6.5

CVE-2026-115886: Unauthenticated Server-Side Request Forgery and Unsafe Reflection in MLflow Scorer Evaluation Endpoints

CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.

Alon Barad
Alon Barad
12 views•10 min read
•2 days ago•CVE-2026-113872
7.5

CVE-2026-113872: Unauthenticated Process Crash in Express Multer via Late Busboy Stream Resumption

CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.

Amit Schendel
Amit Schendel
10 views•12 min read
•2 days ago•CVE-2026-115897
2.1

CVE-2026-115897: Cross-Site Scripting via Function Body Boundary Bypass in serialize-javascript

CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.

Amit Schendel
Amit Schendel
7 views•13 min read
•2 days ago•CVE-2026-109841
5.9

CVE-2026-109841: Subresource Integrity Verification Bypass in Node.js Undici

CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.

Alon Barad
Alon Barad
17 views•9 min read