LiveActive security incident?Get immediate response
CVE Record

CVE-2021-32827: Arbitrary code execution in MockServer

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.

MediumCVSS 6.1Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

MockServer can let a malicious website compromise a machine running it locally. The issue combines permissive CORS with scriptable dynamic expectations, allowing code to run as MockServer after a developer visits an attacker-controlled page.

Executive priority

Treat this as a developer-environment compromise risk. It is not listed as actively exploited, but arbitrary code execution on engineering machines can expose credentials, source code, and internal access.

Technical view

MockServer’s broad default CORS policy permits cross-site requests from arbitrary origins. Its JavaScript and Velocity dynamic expectation features can execute code in the MockServer context. The attack requires user interaction and a reachable MockServer instance.

Likely exposure

Most likely exposure is developer workstations, test environments, or CI systems running MockServer. The source bundle lists mock-server MockServer as affected across all versions, but does not name a fixed version.

Exploitation context

The bundle does not show CISA KEV listing or confirmed active exploitation. It references a GitHub Security Lab advisory with proof-of-concept details, so public technical knowledge exists.

Researcher notes

The core risk is issue chaining: cross-origin request acceptance plus script injection through dynamic expectations. Evidence in the bundle is sufficient for exposure assessment, but incomplete on patched versions or vendor-endorsed mitigations.

Mitigation direction

  • Check MockServer vendor guidance for fixed versions or recommended configuration changes.
  • Restrict MockServer CORS origins to trusted development hosts only.
  • Disable or tightly control JavaScript and Velocity dynamic expectations where possible.
  • Avoid browsing untrusted sites from systems running MockServer.
  • Do not expose MockServer beyond trusted local or test networks.

Validation and detection

  • Inventory developer, CI, and test systems running MockServer.
  • Review MockServer configuration for permissive CORS settings.
  • Identify usage of JavaScript or Velocity dynamic expectations.
  • Confirm whether MockServer is reachable from browsers on developer machines.
  • Check vendor advisories for current remediation status.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-74: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-32827 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.1CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N1.64Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.1Medium
CVSS 3.1 vector shape for CVE-2021-32827Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
mock-servermockserverallListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-74 · source CWE mapping

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.