CVE-2021-21422 json
XSS Vulnerability in mongo-express
published 2021-06-21 5 y ago modified 2026-07-08 4 mo ago also GHSA-7p8h-86p5-wv3p , EUVD-2021-1282
- cvss
- 8.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Exploit prediction
1.57% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/mongo-express/mongo-express/security/advisories/GHSA-7p8h-86p5-wv3p referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/mongo-express/mongo-express/issues/577 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mongo-express | <1.0.0-alpha.4 |
1.0.0-alpha.4 |
Affected products
- mongo-express mongo-express
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/mongo-express/mongo-express/commit/f5e0d4931f856f032f22664b5e5901d5950cfd4b
web, patch, third-party-advisory
-
github.com
/mongo-express/mongo-express/security/advisories/GHSA-7p8h-86p5-wv3p
web, exploit, third-party-advisory
-
github.com
/mongo-express/mongo-express/issues/577
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21422
advisory
Sources
- CVE List CVE-2021-21422
- GitHub Advisory GHSA-7p8h-86p5-wv3p
- NVD CVE-2021-21422
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.