Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2019-10758: Remote Code Execution in mongo-express toBSON

Published Dec 24, 2019 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.9Critical · v3.1
EPSS84.7%100th percentile
CISA KEVYesAdded Dec 10, 2021
In the wildActivePer CISA KEV
Vendor
Mongo-Express Project
IdentifiersCVE-2019-10758CWE-94 · Improper Control of Generation of…

CVE-2019-10758 is a remote code execution vulnerability in mongo-express versions before 0.54.0. Endpoints using the toBSON method misuse the vm dependency to execute commands in an unsafe environment, allowing attackers to execute code remotely. The vulnerability has been exploited in Sysrv-hello and Gitpaste-12 cryptomining campaigns.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits remote execution of attacker-controlled code on the system running mongo-express. Observed exploitation includes cryptomining malware campaigns that deploy miners and self-propagating malware. The vulnerability is included in CISA's Known Exploited Vulnerabilities catalog.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible, restrict network access to mongo-express so it is not reachable by untrusted users, especially from the public Internet. Limit access to trusted administrative networks, place the service behind strong authentication and network filtering, and disable or isolate exposed functionality that processes untrusted BSON-related input where feasible. Running the service with minimal OS and database privileges can reduce post-exploitation impact but does not eliminate the vulnerability.

Remediation

Patch, then assume compromise.

Upgrade mongo-express to version 0.54.0 or later.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
vulhub-mongo-express-cve-2019-10758This 34-file repository is a deliberately vulnerable training lab for CVE-2019-10758, not a standalone exploit framework. It includes a working-style HTTP exploit example in the English and Chinese app READMEs, but no automated exploit client. The example submits JavaScript in the document parameter to POST /checkValid. The documented vulnerable toBSON path evaluates that input in Node.js vm; the payload reaches the host process, imports child_process, and executes touch /tmp/success. No reverse shell, persistence, exfiltration, or host/container escape payload is supplied, and execution was not independently verified. isoloom.yml is the canonical lab specification. app/ contains the vendored Vulhub walkthrough and minimal Compose deployment. base/mongo-express/0.53.0/ contains the image Dockerfile and Bash entrypoint, showing Node.js 12, mongo-express 0.53.0, and empty Basic-auth credentials. The active lab uses published vulhub/mongo-express:0.53.0 and mongo:3.4 images rather than building that Dockerfile. MongoDB is supporting infrastructure, not a separately exploited target. UPSTREAM.md records Vulhub commit 8fd63916f7a8711e2e01dda0d27237e4d6175d38 as vendored provenance; the analyzed repository's original URL, analyzed ref, and archive size were not supplied, so those metadata fields are left empty or zero. .isoloom/ contains generated Docker Compose, Kubernetes deployments/services/network policies/check jobs, a Vagrant Docker-host VM, Proxmox Terraform, and Terraform deployments for AWS, Azure, DigitalOcean, GCP, Linode, and OCI. Docker assigns web 10.60.247.10 and MongoDB 10.60.247.20 on 10.60.247.0/24. Web TCP 8081 is published; MongoDB TCP 27017 stays internal. Docker sidecars remove default routes, while Kubernetes policies restrict outbound access to namespace peers and cluster DNS. Cloud firewalls restrict SSH and published web access to a configured allowed_cidr. These isolation measures can prevent callbacks to external shell listeners but do not remove the RCE vulnerability. checks/express.sh and six generated shell runners check HTTP identity, database listing, service reachability, and outbound isolation; they do not test exploitation of /checkValid. GitHub workflows validate generated infrastructure and running lab health, and register approved labs using secret-configured backend/token URLs that are not visible in the supplied files. The 17 code/build files comprise eight shell scripts, seven Terraform files, one Ruby Vagrantfile, and one Dockerfile; JavaScript appears only as an embedded documentation payload. Remaining files are configuration, metadata, licensing, or documentation. Image tags and several upstream downloads are not immutable pins. The rm -rf commands shown are scoped CI cleanup and lab reprovisioning operations, not evidence of a fake exploit.CyberCTF · Disclosed Oct 8, 2026 · bash · sh · web · networkOperationalCVE-2019-10758This repository is a proof-of-concept (PoC) exploit for CVE-2019-10758, a remote code execution vulnerability in mongo-express <=0.53.0. The repository contains three files: a README.md with setup and exploitation instructions, a main.js script that crafts the exploit payload, and a package-lock.json for dependencies. The exploit works by sending a specially crafted payload to the /checkValid endpoint of a locally running mongo-express instance, leveraging server-side JavaScript injection to execute arbitrary system commands. The provided payload demonstrates launching the Calculator app on macOS, but any command could be executed. The exploit requires the vulnerable mongo-express to be running with default credentials and accessible on http://localhost:8081. The main.js file is the core exploit script, while the README provides both a cURL-based and script-based exploitation method. No detection or fake code is present; this is a functional PoC exploit.masahiro331 · Disclosed Dec 26, 2019 · javascript · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Mongo-Express ProjectMongo-Expressapplication
FAQ

Frequently asked questions

Is CVE-2019-10758 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Dec 10, 2021.
Is there a public exploit for CVE-2019-10758?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2019-10758, the earliest disclosed Dec 26, 2019.
Is there a patch for CVE-2019-10758?
Upgrade mongo-express to version 0.54.0 or later.
What products are affected by CVE-2019-10758?
Mongo-Express Project Mongo-Express.
How severe is CVE-2019-10758?
CVE-2019-10758 has a CVSS v3.1 score of 9.9 (Critical) and an EPSS score of 84.7% (100th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware6Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.