# CVE-2019-10758: Remote Code Execution Vulnerability in NPM mongo-express

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.9
- **CVSS:** 9.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Yes: in CISA KEV since 2021-12-10; federal due date 2022-06-10
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 84.73% (percentile 100, 2026-11-26)
- **CWE:** CWE-94
- **Aliases:** GHSA-h47j-hc6x-h3qq, SNYK-JS-MONGOEXPRESS-473215
- **Published:** 2019-12-24T21:08:36.000Z
- **Modified:** 2026-09-10T03:49:24.747Z

## Who should check

- Projects that depend on npm package mongo-express (\< 0.54.0)
- Anyone running mongo-express All versions prior to version 0.54.0

## Description

mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the \`toBSON\` method. A misuse of the \`vm\` dependency to perform \`exec\` commands in a non-safe environment.

## Affected and fixed versions

- npm `mongo-express`: affected \< 0.54.0; fixed 0.54.0 (osv)
- mongo-express: All versions prior to version 0.54.0 (cvelist)

## Mitigation

- Upgrade mongo-express to 0.54.0 or later.

## Timeline

- 2019-12-24: Published
- 2021-12-10: Added to CISA KEV (exploited in the wild)
- 2022-06-10: CISA remediation due date for US federal agencies
- 2026-09-10: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2019-10758. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2019-10758.md
Affected: mongo-express < 0.54.0
Fixed in: 0.54.0

Steps:
1. Search this machine and project for mongo-express (npm), mongo-express: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2019-10758 being exploited?

Yes. CISA lists CVE-2019-10758 in its Known Exploited Vulnerabilities catalog since 2021-12-10, which means attacks have been seen. Public exploit code or a proof of concept is available. EPSS estimates a 84.73% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2019-10758?

Critical: CVSS 9.9 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2019-10758?

mongo-express \< 0.54.0.

### Is there a fix for CVE-2019-10758?

Yes. Fixed in 0.54.0. Upgrade mongo-express to 0.54.0 or later.

### How do I check if I'm affected by CVE-2019-10758?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2019-10758>
- patch: <https://github.com/mongo-express/mongo-express/pull/522>
- patch: <https://github.com/mongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce68eab5731494>
- patch: <https://github.com/mongo-express/mongo-express/commit/d8c9bda46a204ecba1d35558452685cd0674e6f2>
- exploit: <https://snyk.io/vuln/SNYK-JS-MONGOEXPRESS-473215>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758>
- other: <https://github.com/mongo-express/mongo-express>
- other: <https://github.com/mongo-express/mongo-express/blob/ea02b364d43f179f191fc91fb9962efdb0843a8d/lib/bson.js#L60>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2019-10758>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-h47j-hc6x-h3qq> (license: <https://creativecommons.org/licenses/by/4.0/>)
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2019-10758> · JSON: <https://flawdb.com/api/v1/entries/CVE-2019-10758>
