CVE-2026-59148

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

State
Published
Severity
8.8 High
Published
Jul 9, 2026
Updated
Jul 9, 2026
Reserved
Jul 2, 2026

Read the record on cve.org

Description

Mockoon provides way to design and run mock APIs. Prior to 9.7.0, Mockoon's admin API in commons-server/src/libs/server/admin-api.ts is mounted on the same Express listener as user-defined mock routes, enabled by default in shipped runtimes, serves Access-Control-Allow-Origin: * with write methods allowed, and has no authentication. Any unauthenticated caller who can reach the mock server port can read MOCKOON_* environment variables, write arbitrary process environment variables through /mockoon-admin/env-vars, rewrite mock route bodies, statuses, and headers through PUT /mockoon-admin/environment, read transaction logs and SSE streams, and purge state. This issue is fixed in version 9.7.0.

Scores

CVSSScoreVectorSource
3.18.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-306 Missing Authentication for Critical Function
  • CWE-352 Cross-Site Request Forgery (CSRF)
  • CWE-732 Incorrect Permission Assignment for Critical Resource
  • CWE-942 Permissive Cross-domain Policy with Untrusted Domains

Affected Products

ProductVersions
mockoonmockoon
  • < 9.7.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.