Share
## https://sploitus.com/exploit?id=12FC8639-F982-5313-9DAB-1127B1620476
# 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