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

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.57%, higher than 76% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-06-21T18:45:12.000Z
- Modified: 2026-07-08T06:29:33.325Z
- Also known as: GHSA-7p8h-86p5-wv3p
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- mongo-express mongo-express: < v1.0.0-alpha.4
- mongo-express (npm): before 1.0.0-alpha.4
- mongo-express_project mongo-express: up to 0.54.0; 1.0.0

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/mongo-express/mongo-express/security/advisories/GHSA-7p8h-86p5-wv3p> (exploit, 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/commit/f5e0d4931f856f032f22664b5e5901d5950cfd4b> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21422> (advisory)

## Sources

- CVE List: [CVE-2021-21422](https://www.cve.org/CVERecord?id=CVE-2021-21422), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-7p8h-86p5-wv3p](https://github.com/advisories/GHSA-7p8h-86p5-wv3p), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-21422](https://nvd.nist.gov/vuln/detail/CVE-2021-21422), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21422 · Whole record: https://cve.day/CVE-2021-21422.json · Rebuilt by cve.day 2026-11-25T22:58:02.045Z
