CVE-2021-32827 json
Arbitrary code execution in MockServer
published 2021-08-16 5 y ago modified 2026-06-17 4 mo ago also GHSA-v3cg-h3f6-2242 , EUVD-2021-1880
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.2%
- EPSS 2.2% chance of exploitation in 30 days, percentile 82%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Exploit prediction
2.16% chance of exploitation in the next 30 days, higher than 82% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- securitylab.github.com https://securitylab.github.com/advisories/GHSL-2021-059-mockserver/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
| NVD | 3.1 | 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.mock-server:mockserver | <=5.11.2 |
no fix listed |
Affected products
- mock-server mockserver
Classification
References
-
oracle.com
/security-alerts/cpujan2022.html
web, patch, third-party-advisory
-
securitylab.github.com
/advisories/GHSL-2021-059-mockserver/
exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32827
advisory
-
github.com
/mock-server/mockserver
package
-
securitylab.github.com
/advisories/GHSL-2021-059-mockserver
advisory
Sources
- CVE List CVE-2021-32827
- GitHub Advisory GHSA-v3cg-h3f6-2242
- NVD CVE-2021-32827
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.