CVE-2021-32827: Arbitrary code execution in MockServer
Vulnerability summary
CVE-2021-32827 is a critical (CVSS 9.6) vulnerability in mock-server mockserver. EPSS estimates a 2.16% chance of exploitation in the next 30 days, higher than 82.8% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Timeline
- 16-08-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- CVE.orgCNA6.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:NDiffers
- OSV · MavenEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:NDiffers
EPSS trend
Probability
2.16%
Chance of exploitation in the next 30 days
Percentile
83%
Versus all other CVEs
30-day change
No change 0.00 pp
From 2.16% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundGhsl 2021 059 Mockserver
Maturity: poc
Weaknesses
CWE · root cause- CWE-74Improper Neutralization of Special Elements in Output Used by a Downstream ComponentThe product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
- CWE-79Improper Neutralization of Input During Web Page GenerationThe product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Mock-server1 product
- mockserverall
Oracle1 product
Org.mock-server1 product
- mockserver≤ 5.11.2
3 vendors · 3 products
References
5 links- securitylab.github.com/advisories/GHSL-2021-059-mockserver/X Refsource CONFIRMExploitThird Party Advisory