LiveActive security incident?Get immediate response
CVE Record

CVE-2021-21422: XSS Vulnerability in mongo-express

mongo-express is a web-based MongoDB admin interface, written with Node.js and express. 1: As mentioned in this issue: https://github.com/mongo-express/mongo-express/issues/577, when the content of a cell grows larger than supported size, clicking on a row will show full document unescaped, however this needs admin interaction on cell. 2: Data cells identified as media will be rendered as media, without being sanitized. Example of different renders: image, audio, video, etc. As an example of type 1 attack, an unauthorized user who only can send a large amount of data in a field of a document may use a payload with embedded javascript. This could send an export of a collection to the attacker without even an admin knowing. Other types of attacks such as dropping a database\collection are possible.

HighCVSS 8.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

mongo-express could display stored database content without safe escaping. A person who can insert data into MongoDB may be able to make an administrator’s browser run script when the admin views affected rows or media-like cells, risking collection export or destructive admin actions.

Executive priority

Prioritize remediation for any exposed or shared mongo-express deployment because the issue targets administrators and can turn stored data into browser-executed actions with confidentiality and integrity impact.

Technical view

CVE-2021-21422 is stored XSS in mongo-express before v1.0.0-alpha.4. Large cell expansion could show unescaped full documents, and media-identified cells were rendered without sanitization. CVSS 3.1 is 8.1 high with network attack vector, no privileges required, and user interaction required.

Likely exposure

Exposure is likely where mongo-express versions earlier than v1.0.0-alpha.4 are deployed, especially if the admin UI is reachable by many users or displays data written by less-trusted users, services, imports, or integrations.

Exploitation context

The sources do not show CISA KEV listing or active exploitation. Exploitation requires malicious content to be present in a document and an administrator to interact with affected UI rendering. The advisory describes possible data export and database or collection deletion impacts.

Researcher notes

The evidence supports stored XSS through unescaped full-document display and unsanitized media rendering. Do not assume unauthenticated access to mongo-express itself; the described attacker needs a way to write data that an administrator later views.

Mitigation direction

  • Upgrade mongo-express to v1.0.0-alpha.4 or later.
  • Restrict mongo-express access to trusted administrators only.
  • Limit network exposure of the mongo-express admin interface.
  • Review write paths that place untrusted content into viewed collections.
  • Follow the GitHub advisory if older versions cannot be upgraded immediately.

Validation and detection

  • Inventory all mongo-express deployments and confirm their running versions.
  • Check whether any deployment is older than v1.0.0-alpha.4.
  • Review access controls for the mongo-express web interface.
  • Identify collections populated by untrusted users, services, imports, or integrations.
  • Confirm remediation by retesting version inventory and admin UI access restrictions.
Prepared
Confidence
high
Sources
5

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 · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. 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

Database behavior lookup

The CVE wording references database injection or access, so collection and exfiltration review may help. 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-21422 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
High
CVSS
8.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/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
4Source 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
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N2.85.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.1High
CVSS 3.1 vector shape for CVE-2021-21422Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/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
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
mongo-expressmongo-express< v1.0.0-alpha.4Listed
Weakness

CWE details

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