Skip to content

Unauthenticated file reads through default-exposed admin API

High
pimterry published GHSA-7wvg-3v5v-p8hh Jul 28, 2026

Package

npm mockttp (npm)

Affected versions

>=4.0.0, < 4.6.0
<3.17.2

Patched versions

4.6.0
3.17.2

Description

When using mockttp with the optional remote admin server enabled (getAdminServer().start()) it binds to all network interfaces via address 0.0.0.0, in the default configuration, or if only a port option is supplied with no host.

This exposes the Mockttp admin API with no authentication required, allowing API clients to configure & start local test servers with their own custom rules. This allow access to significant functionality to anybody with direct network access to the exposed port on the machine. Most notably, in combination with remotely configured rules and access to the resulting dynamically created proxy port on the machine, an attacker could potentially use rules to expose process-readable files from the machine and then retrieve them by sending requests to the created mock server.

This does not affect use cases where:

  • The remote admin server is not explicitly enabled (i.e. if only the standard getLocal() API is used, the admin API is not exposed).
  • The remote admin server is used, but host: "localhost" or similar is passed to start(), to limit access to the local interface.
  • A firewall is in place or ports are not exposed, such that unexpected external connections to the admin port (45456) are not allowed. Note that this applies to most default Docker & CI configurations (including GitHub Actions).
  • The local network is trusted. This API will likely not be accessible beyond your LAN, unless all ports on the device are directly connected to the internet.

In other cases (admin server is used, with default settings, and is reachable by untrusted parties) any data that is readable by test process could have been exposed.

This admin API is only accessible while the admin server is running. In a typical testing configuration, that is just during the execution of the test runner.

In the patched versions (4.6.0 and 3.17.2) the default host option is changed to 127.0.0.1, so the Mockttp admin server is only accessible to local connections by default, unless explicitly configured.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CVE ID

No known CVE

Weaknesses

Initialization of a Resource with an Insecure Default

The product initializes or sets a resource with a default that is intended to be changed by the administrator, but the default is not secure. Learn more on MITRE.

Binding to an Unrestricted IP Address

The product assigns the address 0.0.0.0 for a database server, a cloud service/instance, or any computing resource that communicates remotely. Learn more on MITRE.

Credits