CVE-2021-32827

MEDIUM

MockServer - Code Execution via Overbroad CORS and Script Injection

Title source: manual
STIX 2.1

Description

MockServer is open source software which enables easy mocking of any system you integrate with via HTTP or HTTPS. An attacker that can trick a victim into visiting a malicious site while running MockServer locally, will be able to run arbitrary code on the MockServer machine. With an overly broad default CORS configuration MockServer allows any site to send cross-site requests. Additionally, MockServer allows you to create dynamic expectations using Javascript or Velocity templates. Both engines may allow an attacker to execute arbitrary code on-behalf of MockServer. By combining these two issues (Overly broad CORS configuration + Script injection), an attacker could serve a malicious page so that if a developer running MockServer visits it, they will get compromised. For more details including a PoC see the referenced GHSL-2021-059.

References (2)

Core 2
Core References
Exploit, Third Party Advisory x_refsource_confirm
https://securitylab.github.com/advisories/GHSL-2021-059-mockserver/
Patch, Third Party Advisory x_refsource_misc
https://www.oracle.com/security-alerts/cpujan2022.html

Scores

CVSS v3 6.1
EPSS 0.0076
EPSS Percentile 73.5%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Details

CWE
CWE-74 CWE-79
Status published
Products (3)
mock-server/mockserver
oracle/communications_cloud_native_core_policy 1.14.0
org.mock-server/mockserver 0Maven
Published Aug 16, 2021
Tracked Since Feb 18, 2026