XSS Vulnerability in mongo-express
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mongo-express | mongo-express | before v1.0.0-alpha.4 | v1.0.0-alpha.4 | Patch available | CNA |
| — | mongo-express (npm) | before 1.0.0-alpha.4 | 1.0.0-alpha.4 | Patch available | GHSA-7p8h-86p5-wv3p |
- mongo-express Vendormongo-express Affected before v1.0.0-alpha.4 Fixed in v1.0.0-alpha.4 Patch available CNA
- mongo-express (npm) Vendor— Affected before 1.0.0-alpha.4 Fixed in 1.0.0-alpha.4 Patch available GHSA-7p8h-86p5-wv3p
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:mongo-express_project:mongo-express:*:*:*:*:*:node.js:*:* | up to 0.54.0 | Vulnerable | Mongo-express Project |
| cpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha1:*:*:*:*:*:* | 1.0.0 alpha1 | Vulnerable | Mongo-express Project |
| cpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha3:*:*:*:*:*:* | 1.0.0 alpha3 | Vulnerable | Mongo-express Project |
- cpe:2.3:a:mongo-express_project:mongo-express:*:*:*:*:*:node.js:*:* Versions up to 0.54.0 Vulnerable ·Mongo-express Project
- cpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha1:*:*:*:*:*:* Versions 1.0.0 alpha1 Vulnerable ·Mongo-express Project
- cpe:2.3:a:mongo-express_project:mongo-express:1.0.0:alpha3:*:*:*:*:*:* Versions 1.0.0 alpha3 Vulnerable ·Mongo-express Project
Remediation
- Fix · CNA mongo-express (mongo-express) Fixed in v1.0.0-alpha.4
- Fix · GHSA-7p8h-86p5-wv3p mongo-express (npm) Fixed in 1.0.0-alpha.4 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21422
- 2026-10-03 Alias added: GHSA-7p8h-86p5-wv3p
References
Exploit 2
Patch 1
More Mongo-express Project Mongo-express vulnerabilities
- TI-2019-08023 Code injection in mongo-express KEVCVSS 3.1CRITICAL 9.9
- TI-2020-14931 mongo-express before 1.0.0 offers support for certain advanced syntax but implements this… CVSS 3.1CRITICAL 9.8
- TI-2023-28898 In mongo-express 1.0.2, /admin allows CSRF, as demonstrated by deletion of a Collection. CVSS 3.1MEDIUM 6.1
- TI-2021-06065 Denial of service (DoS) in mongo-express CVSS 3.1HIGH 7.5
Sources
- CVE-2021-21422 · CVE Program
- CVE-2021-21422 · NVD
- FIRST EPSS
- GHSA-7p8h-86p5-wv3p · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences