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.
Problem types
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
Product status
References
github.com/...ockoon/security/advisories/GHSA-rqx4-3f6q-3x2v
github.com/...ockoon/security/advisories/GHSA-rqx4-3f6q-3x2v
github.com/mockoon/mockoon/pull/2254
github.com/...ommit/c420b5a56918475b8663977b51e5f986e45b3299
github.com/mockoon/mockoon/releases/tag/v9.7.0