# CVE-2021-32827: Arbitrary code execution in MockServer

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.16%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-08-16T20:50:09.000Z
- Modified: 2026-06-17T03:53:42.707Z
- Also known as: GHSA-v3cg-h3f6-2242
- Weaknesses: CWE-74, CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- mock-server mockserver: all
- org.mock-server:mockserver (Maven): up to 5.11.2
- oracle communications_cloud_native_core_policy: 1.14.0

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N`
- NVD: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://securitylab.github.com/advisories/GHSL-2021-059-mockserver/> (exploit, third-party-advisory)
- <https://www.oracle.com/security-alerts/cpujan2022.html> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32827> (advisory)
- <https://github.com/mock-server/mockserver> (package)
- <https://securitylab.github.com/advisories/GHSL-2021-059-mockserver> (advisory)

## Sources

- CVE List: [CVE-2021-32827](https://www.cve.org/CVERecord?id=CVE-2021-32827), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-v3cg-h3f6-2242](https://github.com/advisories/GHSA-v3cg-h3f6-2242), CC-BY-4.0, modified 2024-02-19
- NVD: [CVE-2021-32827](https://nvd.nist.gov/vuln/detail/CVE-2021-32827), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32827 · Whole record: https://cve.day/CVE-2021-32827.json · Rebuilt by cve.day 2026-11-25T22:58:03.269Z
