{"id":"CVE-2021-21422","published":"2021-06-21T18:45:12Z","modified":"2024-08-03T18:09:16Z","title":"XSS Vulnerability in mongo-express","vendor":"mongo-express","product":"mongo-express","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0157,"percentile":0.75976,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/mongo-express/mongo-express/security/advisories/GHSA-7p8h-86p5-wv3p","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mongo-express/mongo-express/issues/577","tags":["x_refsource_MISC"]},{"url":"https://github.com/mongo-express/mongo-express/commit/f5e0d4931f856f032f22664b5e5901d5950cfd4b","tags":["x_refsource_MISC"]}],"priority":{"score":20.9,"factors":[{"name":"EPSS percentile","points":15.2},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"mongo-express","affectedVersions":[{"vendor":"mongo-express","product":"mongo-express","versions":["< v1.0.0-alpha.4"]}],"affected":[{"ecosystem":"npm","package":"mongo-express","vulnerableRanges":["<1.0.0-alpha.4"],"patched":["1.0.0-alpha.4"],"from":["GHSA-7p8h-86p5-wv3p"],"provenance":"source"}],"summary":{"text":"mongo-express, a Node.js and Express web-based admin interface for MongoDB, has a cross-site scripting flaw in how it renders document data: cells holding large content, and data cells identified as media, are displayed without sanitization, so embedded JavaScript can execute in the admin's browser. An attacker with no privileges who can write a large field into a document can exploit this when an administrator clicks a row or views the media cell, requiring user interaction and enabling actions such as exporting a collection to the attacker or dropping a database or collection.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:12:37Z"},"euvd":{"id":"EUVD-2021-1282","exploited":false,"provenance":"source"}}