CVE-2021-21422
MEDIUM 6.1CVSS 3.1Cross-site scripting
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.
- Published
- 21 Jun 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-7p8h-86p5-wv3p
- Sources
- NVDJSONOSV GHSA-7p8h-86p5-wv3pJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mongo-express_project | mongo-expresscpe:2.3:a:mongo-express_project:mongo-express:*:*:*:*:*:node.js:*:* |
<= 0.54.0 | |
| NVD | mongo-express_project | mongo-expresscpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha1:*:*:*:*:*:* |
= 1.0.0 | |
| NVD | mongo-express_project | mongo-expresscpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha3:*:*:*:*:*:* |
= 1.0.0 | |
| OSV | npm | mongo-express | < 1.0.0-alpha.4 | 1.0.0-alpha.4 |
References
- https://github.com/mongo-express/mongo-express/commit/f5e0d4931f856f032f22664b5e5901d5950cfd4b · Patch, Third Party Advisory, WEB
- https://github.com/mongo-express/mongo-express/issues/577 · Exploit, Third Party Advisory, WEB
- https://github.com/mongo-express/mongo-express/security/advisories/GHSA-7p8h-86p5-wv3p · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21422 · ADVISORY
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 21 Jun 2021)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 28 Jun 2021)