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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-37979 PoC — WordPress Plugin Ninja Forms 跨站脚本漏洞

Source
Associated Vulnerability
Title:WordPress Plugin Ninja Forms 跨站脚本漏洞 (CVE-2023-37979)
Description:WordPress和WordPress plugin都是WordPress基金会的产品。WordPress是一套使用PHP语言开发的博客平台。该平台支持在PHP和MySQL的服务器上架设个人博客网站。WordPress plugin是一个应用插件。 WordPress Plugin Ninja Forms 3.6.25及之前版本存在跨站脚本漏洞,该漏洞源于不会对某些参数进行转义,攻击者利用该漏洞可以将恶意脚本注入web网站。
Readme
# CVE-2023-37979 Exploit

![Python Version](https://img.shields.io/badge/python-3.x-blue.svg)
![Nuclei](https://img.shields.io/badge/Nuclei-template-yellow.svg)


| CVE ID       | CVSS Score      | Discovered   | Affected Plugin | Vendor          | Vulnerability Type        |
|--------------|-----------------|--------------|-----------------|-----------------|---------------------------|
| CVE-2023-37979| ![Medium](https://img.shields.io/badge/6.1-Medium-orange)   | 27/07/2023   | WordPress Plugin | Ninja-forms | Reflected XSS |

### Python Script
CVE `Python` script exploits the reflected Cross-Site Scripting (XSS) vulnerability CVE-2023-37979 found in the Ninja-forms WordPress plugin. This CVE could allow a malicious actor to inject malicious scripts, such as redirects, advertisements, and other HTML payloads into your website which will be executed when guests visit your site.
This vulnerability has been fixed in version 3.6.26

### Nuclei Template
I have created a CVE yaml file as a Nuclei template to detect vulnerable versions of the plugin (version 3.6.25 or lower). Although the vulnerability detection is already available in the Python script, I decided to publish its yaml version for Nuclei fans.

## Usage
```
Usage: CVE-2023-37979.py [OPTIONS] [TARGET]
  OPTIONS:
        --exploit:  Open a browser and execute the vulnerability.
  TARGET:
        An URL starts with 'http://' or 'https://'

Examples:
    > CVE-2023-37979.py https://vulnsite.com
    > CVE-2023-37979.py --exploit https://vulnsite.com
```

## How It Works
The script first checks if the Ninja-forms plugin is installed on the target site and if the version is vulnerable (version 3.6.25 or lower).
If the plugin is vulnerable, the script generates an HTML PoC file with the malicious payload.
The PoC file contains an HTML form that triggers the XSS vulnerability when submitted.
The generated PoC file will be opened in the default web browser automatically for testing.

> **Warning**
> This script is provided for educational and ethical purposes only. It must not be used against any unauthorized systems or for malicious purposes. The author is not responsible for any misuse of this script.

> **Note**
> Feel free to contribute.

> **Exploit DB**
> https://www.exploit-db.com/exploits/51644

## References
> https://patchstack.com/articles/multiple-high-severity-vulnerabilities-in-ninja-forms-plugin?_s_id=cve
> https://patchstack.com/database/vulnerability/ninja-forms/wordpress-ninja-forms-plugin-3-6-25-reflected-cross-site-scripting-xss-vulnerability?_s_id=cve
File Snapshot

[4.0K] /data/pocs/0fb5a29e786b85e6ae09965ba5db9570d1c5dcba ├── [5.4K] CVE-2023-37979.py ├── [1.6K] CVE-2023-37979.yaml ├── [ 34K] LICENSE ├── [2.5K] README.md └── [ 19] requirements.txt 0 directories, 5 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.