CVE-2021-32827
JSON

6.1medium

Arbitrary code execution in MockServer

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
2.16% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v3cg-h3f6-2242

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.

Affected

Product or packageVersionsReported by
mock-server mockserverallCVE List, NVD
org.mock-server:mockserver (Maven)up to 5.11.2GitHub Advisory Database
oracle communications_cloud_native_core_policy1.14.0NVD

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
NVD9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

NVD (es)

MockServer es un software de código abierto que permite burlarse fácilmente de cualquier sistema con el que se integre por medio de HTTP o HTTPS. Un atacante que pueda engañar a una víctima para que visite un sitio malicioso mientras ejecuta MockServer localmente, será capaz de ejecutar código arbitrario en la máquina MockServer. Con una configuración CORS demasiado amplia por defecto, MockServer permite que cualquier sitio envíe peticiones de tipo cross-site. Además, MockServer permite crear expectativas dinámicas usando plantillas Javascript o Velocity. Ambos motores pueden permitir a un atacante ejecutar código arbitrario en MockServer. Al Combinar estos dos problemas (configuración de CORS demasiado amplia + inyección de scripts), un atacante podría servir una página maliciosa de forma que si un desarrollador que ejecuta MockServer la visita, se verá comprometido. Para más detalles, incluyendo un PoC, consulte el referido GHSL-2021-059.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32827 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-v3cg-h3f6-2242 changed 2024-02-19CC-BY-4.0
NVDCVE-2021-32827 changed 2026-06-17Public domain