CriticalCVE-2019-10758

    MongoDB mongo-express Remote Code Execution Vulnerability (CVE-2019-10758)

    Published In CISA KEV since Sources: CVE.org, OSV

    Share

    What is affected, what to do

    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.

    The vulnerability is being actively exploited; treat it as a priority. Update mongo-express to version 0.54.0. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Mongo-express eq All versions prior to version 0.54.0..All versions prior to version 0.54.0

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.9

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    9.9

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: CVE.org, OSV

    84.7 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.71

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    229.04 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.9 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.9
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    84.7 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.71
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 7 February 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-94

    Response and mitigation

    Why act now?

    Prioritisation rationale

    The CVE sits on KEV because exploitation is unauthenticated or trivially authenticated via default credentials, a reliable public PoC exists (vm sandbox escape via toBSON), and mongo-express is historically found unprotected on the internet — a popular target for mass scanning and crypto-mining campaigns. The exploitation likelihood ranks among the very highest across all known CVEs. Treat any instance reachable beyond the admin LAN as P1, and internal dev/test deployments as P2. CISA does not flag ransomware use; the dominant risks are database exfiltration, lateral movement from the Node host, and cryptojacking.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Upgrade mongo-express to 0.54.0 or newer (npm install mongo-express@latest); the flaw is fully patched in 0.54.0. Rebuild and redeploy container images (bitnami/mongo-express, Docker Hub official tags) — older pinned tags still ship the vulnerable vm usage.
      • Pull every internet-exposed mongo-express instance behind an authenticating reverse proxy or take it offline. mongo-express is an admin UI and should never sit on port 8081 facing the public internet.
      • Rotate default credentials (admin/pass, or ME_CONFIG_BASICAUTH_USERNAME/_PASSWORD). Because the CVSS vector is PR:L, one compromised Basic-Auth login equals full RCE — treat it like a compromised shell account.
      • Inventory the fleet: ps -ef | grep mongo-express, ss -tlnp | grep 8081, filter container inventory for images mongo-express:<0.54.0. Shadow-IT dev/staging deployments are the usual find.
      • Review MongoDB instances behind compromised proxies for signs of post-exploitation (new admin users, modified system.users collection, unexpected export jobs). Successful exploitation also grants full database access in the Node process context.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: expose mongo-express only from a jump-host or admin VLAN. Restrict egress from the Node host (no outbound 1024-65535 to the internet) to cut reverse-shell callbacks after a successful RCE.
      • Front with a reverse proxy (nginx, Traefik) enforcing mTLS or SSO (OIDC/SAML) instead of plain Basic Auth. Rate-limit /checkValid, /db/*/exportArray, /db/*/exportCsv and every endpoint that reaches toBSON.
      • Container hardening: run mongo-express as non-root with --read-only filesystem, --cap-drop=ALL, default seccomp profile. Any RCE then stays within the process context and persistence becomes harder.
      • IAM least privilege: the MongoDB user used by mongo-express must only hold the required roles (read/readWrite, never root or __system), with separate credentials per environment.
      • WAF or proxy rule: block and alert on requests to mongo-express endpoints whose body contains constructor, prototype, process., child_process, require( or global.. These tokens are typical for vm sandbox-escape chains.
      • If patching has to wait: disable mongo-express and switch admins to CLI (mongosh) or MongoDB Compass over VPN until the upgrade rolls out.
    3. Runbook step 3

      Detection rules

      • Web and reverse-proxy access logs: POST/PUT to mongo-express paths carrying body patterns this\.constructor\.constructor, require\s*\(\s*['\"]child_process, process\.mainModule. Sigma shape: category: webserver, cs-uri-stem contains '/db/', body or query matches those regexes.
      • Sysmon EID 1 / auditd execve: parent-child chain node spawning sh/bash/cmd.exe/powershell.exe on the mongo-express host. KQL: DeviceProcessEvents | where InitiatingProcessFileName == "node" and FileName in ("sh","bash","dash","cmd.exe","powershell.exe").
      • Network telemetry (Zeek/Suricata): outbound connections from the mongo-express host to non-whitelisted externals, particularly common C2 ports (4444, 1337, 8443, 9001). Suricata idea: alert on new outbound flow owned by process node.
      • MongoDB audit log: unusual createUser, grantRolesToUser, dropDatabase events time-correlated with mongo-express HTTP activity.
      • EDR file events: writes to /tmp/*.sh, /var/tmp/*, ~/.ssh/authorized_keys by the Node process — classic post-RCE persistence in container environments.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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.

    Source: NVD (NIST), OSV (Open Source Vulnerabilities), cvelistv5, CISA KEV Catalog

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    —mongo-express
    • All versions prior to version 0.54.0
    • —
    mongo-express_projectmongo-express
    • < 0.54.0
    • 0.54.0
    npmmongo-express
    • —
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-94Improper Control of Generation of Code ('Code Injection')

      Base

      The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

      Entry at MITRE CWE-94

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    PoC-in-GitHub (nomi-sec)vulhub-mongo-express-cve-2019-10758 (opens in a new tab)github.comPoC (publicly reported)reported, not verified

    References & sources

    • github.commongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-…web
    • NVD (NIST)vuln/detail/CVE-2019-10758advisory
    • github.commongo-express/mongo-express/pull/522web
    • github.commongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce…web
    • github.commongo-express/mongo-express/commit/d8c9bda46a204ecba1d355584526…web
    • github.commongo-express/mongo-expresspackage
    • github.commongo-express/mongo-express/blob/ea02b364d43f179f191fc91fb9962e…web
    • snyk.iovuln/SNYK-JS-MONGOEXPRESS-473215web, x_refsource_MISC, Exploit, Third-party advisory
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758web, government-resource, US government resource
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2019-10758
    <a href="https://intel.neosec.eu/en/cve/CVE-2019-10758"><img src="https://intel.neosec.eu/badge/cve/CVE-2019-10758.svg?lang=en" alt="CVE-2019-10758 – NEOSEC Intel" height="20"></a>