Skip to content

← Actionable
High, CVSS 8.8amended

@Mockoon/commons-server: Unauthenticated admin API + wildcard CORS allows mock-state hijack and secret theft

CVE-2026-59148GHSA-rqx4-3f6q-3x2v

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@mockoon/cli 9.7.0; @mockoon/commons-server 9.7.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-59148: 0.26% estimated exploitation activity in the next 30 days; percentile 18.12 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary Mockoon's admin API (commons-server/src/libs/server/admin-api.ts) is mounted on the same Express listener as the user-defined mock routes, enabled by default in every shipped runtime (commons-server, CLI, serverless), serves Access-Control-Allow-Origin: on every endpoint with all HTTP methods allowed including PUT/POST/PATCH/DELETE/PURGE and Content-Type in Access-Control-Allow-Headers, and has zero authentication of any kind (no token, no shared secret, no MOCKOONADMINTOKEN env var — searched the repo, returns zero hits). Any unauthenticated caller who can reach the mock server's port (default 0.0.0.0:3000) can: - Read every MOCKOON env var used by the operator as secret material in templates (getEnvVar helper). - Write arbitrary process env vars (no prefix check on the WRITE path) — poison operator's MOCKOONAPIKEY, MOCKOONJWTSECRET, …, or write process-level vars like AWSSECRETACCESSKEY that the surrounding runtime consumes. - Rewrite every mock route's body / status /…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-rqx4-3f6q-3x2v

  2. Revision 2 · amended ·

    Amended from osv record GHSA-rqx4-3f6q-3x2v

  3. Revision 1 · created ·

    Published from ghsa record GHSA-rqx4-3f6q-3x2v

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-59148

Advisory: @Mockoon/commons-server: Unauthenticated admin API + wildcard CORS allows mock-state hijack and secret theft
IDs: CVE-2026-59148, GHSA-rqx4-3f6q-3x2v
Record: https://patchnext.com/advisories/cve-2026-59148 (revision 3, source checked 26 Oct 2026, 13:02 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @mockoon/cli 9.7.0; @mockoon/commons-server 9.7.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @mockoon/cli: affected < 9.7.0; fixed in 9.7.0
- npm @mockoon/commons-server: affected < 9.7.0; fixed in 9.7.0

## Suggested inspection (read-only)
- `npm ls @mockoon/cli --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @mockoon/commons-server --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @mockoon/cli, @mockoon/commons-server.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-rqx4-3f6q-3x2v (GitHub-reviewed advisory GHSA-rqx4-3f6q-3x2v lists affected ranges: npm @mockoon/commons-server >=0 =0 <9.7.0)
- Verified: https://osv.dev/vulnerability/GHSA-rqx4-3f6q-3x2v (OSV record GHSA-rqx4-3f6q-3x2v lists affected ranges: npm @mockoon/commons-server >=0 =0 <9.7.0 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…