Arbitrary code execution in MockServer
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mock-server | mockserver | all | — | No fix listed | CNA |
| — | org.mock-server:mockserver (Maven) | up to 5.11.2 | — | No fix listed | GHSA-v3cg-h3f6-2242 |
- mockserver Vendormock-server Affected all Fixed in — No fix listed CNA
- org.mock-server:mockserver (Maven) Vendor— Affected up to 5.11.2 Fixed in — No fix listed GHSA-v3cg-h3f6-2242
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:mock-server:mockserver:*:*:*:*:*:*:*:* | all versions | Vulnerable | mock-server |
| cpe:2.3:a:oracle:communications_cloud_native_core_policy:1.14.0:*:*:*:*:*:*:* | 1.14.0 | Vulnerable | Oracle |
- cpe:2.3:a:mock-server:mockserver:*:*:*:*:*:*:*:* Versions all versions Vulnerable ·mock-server
- cpe:2.3:a:oracle:communications_cloud_native_core_policy:1.14.0:*:*:*:*:*:*:* Versions 1.14.0 Vulnerable ·Oracle
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-02 Threatist record created from CVE-2021-32827
- 2026-10-03 Alias added: GHSA-v3cg-h3f6-2242
References
Advisory 2
Sources
- CVE-2021-32827 · CVE Program
- CVE-2021-32827 · NVD
- FIRST EPSS
- GHSA-v3cg-h3f6-2242 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences