{"id":"CVE-2026-59148","published":"2026-07-09T18:27:18Z","modified":"2026-07-09T19:24:49Z","title":"Mockoon: Unauthenticated admin API + wildcard CORS allows mock-state hijack and secret theft","vendor":"mockoon","product":"mockoon","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00944,"percentile":0.6192,"provenance":"source"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"},{"id":"CWE-352","name":"Cross-Site Request Forgery"},{"id":"CWE-732","name":"Incorrect Permission Assignment for Critical Resource"},{"id":"CWE-942","name":"Permissive Cross-domain Security Policy with Untrusted Domains"}],"references":[{"url":"https://github.com/mockoon/mockoon/security/advisories/GHSA-rqx4-3f6q-3x2v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mockoon/mockoon/pull/2254","tags":["x_refsource_MISC"]},{"url":"https://github.com/mockoon/mockoon/commit/c420b5a56918475b8663977b51e5f986e45b3299","tags":["x_refsource_MISC"]},{"url":"https://github.com/mockoon/mockoon/releases/tag/v9.7.0","tags":["x_refsource_MISC"]},{"url":"https://mockoon.com/releases/9.7.0","tags":["x_refsource_MISC"]}],"priority":{"score":23.5,"factors":[{"name":"EPSS percentile","points":12.38},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"nuclei":[{"id":"CVE-2026-59148","name":"Mockoon < 9.7.0 - Unauthenticated Admin API","severity":"high","path":"http/cves/2026/CVE-2026-59148.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-59148.yaml"}],"provenance":"source"},"vendorSlug":"mockoon","affectedVersions":[{"vendor":"mockoon","product":"mockoon","versions":["< 9.7.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-07-09T19:24:39.649769Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@mockoon/commons-server","vulnerableRanges":["<9.7.0"],"patched":["9.7.0"],"from":["GHSA-rqx4-3f6q-3x2v"],"provenance":"source"},{"ecosystem":"npm","package":"@mockoon/cli","vulnerableRanges":["<9.7.0"],"patched":["9.7.0"],"from":["GHSA-rqx4-3f6q-3x2v"],"provenance":"source"}],"summary":{"text":"Mockoon's admin API, which is mounted on the same Express listener as user-defined mock routes and enabled by default in shipped runtimes, lacks authentication and sends a wildcard CORS header, in versions before 9.7.0. An attacker who can reach the mock server port can read MOCKOON_* environment variables, write arbitrary process environment variables, rewrite mock routes, read logs and streams, and purge state, and cross-origin exploitation requires a user to interact with an attacker-controlled page while the mock server is running.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:00:35Z"},"euvd":{"id":"EUVD-2026-42683","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-mockoon-cve-2025-59049","parents":[{"from":"CVE-2025-59049","to":"CVE-2026-59148","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@mockoon/commons-server","fromFixed":"9.2.0","toFixed":"9.7.0","daysApart":302},{"kind":"version-step","provenance":"source","package":"npm:@mockoon/cli","fromFixed":"9.2.0","toFixed":"9.7.0","daysApart":302},{"kind":"same-code","provenance":"machine","files":["packages/commons-server/src/libs/server/server.ts","packages/commons/src/models/server.model.ts","packages/serverless/src/libs/serverless.ts"],"commits":["https://github.com/mockoon/mockoon/commit/c7f6e23e87dc3b8cc44e5802af046200a797bd2e","https://github.com/mockoon/mockoon/commit/c420b5a56918475b8663977b51e5f986e45b3299"],"basis":"shared function","functions":["MockoonServer"]}]}],"children":[{"from":"CVE-2026-59148","to":"CVE-2026-59149","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/commons-server/src/libs/server/server.ts"],"commits":["https://github.com/mockoon/mockoon/commit/c420b5a56918475b8663977b51e5f986e45b3299","https://github.com/mockoon/mockoon/commit/b42bdfb7f82e83f0e81bea8e6fe41adf5ec82585"],"basis":"shared function","functions":["MockoonServer"]}]}],"packageHistory":[{"cve":"CVE-2025-59049","published":"2025-09-10","fixed":"9.2.0","kev":false},{"cve":"CVE-2026-59148","published":"2026-07-09","fixed":"9.7.0","kev":false},{"cve":"CVE-2026-59149","published":"2026-07-09","fixed":"9.7.0","kev":false}],"package":"npm:@mockoon/commons-server"}}