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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-7693 PoC — Denial of Service (DoS)

Source
Associated Vulnerability
Title:Denial of Service (DoS) (CVE-2020-7693)
Description:Incorrect handling of Upgrade header with the value websocket leads in crashing of containers hosting sockjs apps. This affects the package sockjs before 0.3.20.
Description
CVE-2020-7693: SockJS 0.3.19 Denial of Service POC
Readme
# CVE-2020-7693: Meteor <1.10.2 SockJS 0.3.19 Denial of Service POC
### Author: Andrew Snow

[SockJS v0.3.19](https://github.com/sockjs/sockjs-node/issues/252) calls `res.end` instead of `res.write` when receiving websocket upgrade requests. This causes an `Error [ERR_STREAM_WRITE_AFTER_END]: write after end` which crashes the container running the app utilising the vulnerable SockJS.

Vulnerable versions affected:
* Meteor JS <1.10.2 which use SockJS 0.3.19
* SockJS 0.3.19

## Usage
This POC is targeted towards vulnerable MeteorJS apps running SockJS on `/sockjs`. To customise for other web apps running SockJS, change the payloads from `/sockjs` to corresponding routes managed by SockJS.

Install Python, then run in cmd/terminal:
```
pip install requests
python poc.py --target <domain>
```

A demo Meteor app running the vulnerable sockjs has been included. To test the exploit on this demo app, install Meteor from https://www.meteor.com/install and then:
```
cd demo/
meteor
```

And then point the payload target to `http://localhost:3000`

## Remediation
Update SockJS to 0.3.20

## References & CVE
* https://snyk.io/vuln/SNYK-JS-SOCKJS-575261
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7693
* https://cwe.mitre.org/data/definitions/400.html
File Snapshot

[4.0K] /data/pocs/fd1ecf54a80807b2cf76b4cf8f4709493a2199fd ├── [4.0K] demo │   ├── [4.0K] client │   │   ├── [ 53] main.css │   │   ├── [ 638] main.html │   │   └── [ 511] main.js │   ├── [ 586] package.json │   ├── [ 15K] package-lock.json │   ├── [4.0K] server │   │   └── [ 106] main.js │   └── [4.0K] tests │   └── [ 487] main.js ├── [ 34K] LICENSE ├── [1.5K] poc.py └── [1.2K] README.md 4 directories, 10 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →