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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2022-0944 PoC — Template injection in connection test endpoint leads to RCE in sqlpad/sqlpad

Source
Associated Vulnerability
Title: Template injection in connection test endpoint leads to RCE in sqlpad/sqlpad (CVE-2022-0944)
Description:Template injection in connection test endpoint leads to RCE in GitHub repository sqlpad/sqlpad prior to 6.10.1.
Description
Refurbish
Readme
# SQLPad 6.10.0 Exploit (CVE-2022-0944)

This Bash script exploits an RCE vulnerability in SQLPad 6.10.0, allowing an attacker to achieve remote code execution (RCE) by abusing the `host` and `database` fields in SQLPad’s MySQL database connection settings. The exploit leverages SQLPad’s unsanitized handling of the `child_process` module in Node.js to execute arbitrary commands, ultimately opening a reverse shell on the attacker's machine.

## Prerequisites
1. **Netcat Listener**: Ensure you have a listener active on your machine with `nc -lvnp 9001`.
2. **Target Server Access**: This exploit assumes you can communicate with the vulnerable SQLPad instance.

## Usage
1. **Clone the Repository** (or copy the script locally).
2. **Run the Script**:
   ```bash
   ./exploit.sh
   ```

3. Follow the script prompts to input the target host and your IP address, then wait for a reverse shell connection.

## Details
- **CVE**: CVE-2022-0944
- **Affected Version**: SQLPad 6.10.0
- **Vulnerability**: Remote Code Execution (RCE) via template injection
- **Impact**: This exploit allows an attacker to execute commands on the target server with the privileges of the SQLPad process.

## Disclaimer
This code is for educational purposes only. Unauthorized access to computer systems is illegal. Only use this exploit with permission.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →