关联漏洞
标题:
WordPress plugin PT Project Notebooks 安全漏洞
(CVE-2025-5304)
描述:WordPress和WordPress plugin都是WordPress基金会的产品。WordPress是一套使用PHP语言开发的博客平台。该平台支持在PHP和MySQL的服务器上架设个人博客网站。WordPress plugin是一个应用插件。 WordPress plugin PT Project Notebooks 1.0.0至1.1.3版本存在安全漏洞,该漏洞源于wpnb_pto_new_users_add函数中缺少授权,可能导致未经验证的攻击者提升权限至管理员。
描述
PT Project Notebooks 1.0.0 - 1.1.3 - Missing Authorization to Unauthenticated Privilege Escalation
介绍
# CVE-2025-5304
PT Project Notebooks 1.0.0 - 1.1.3 - Missing Authorization to Unauthenticated Privilege Escalation
# 🚀 PT Project Notebooks ≤ 1.1.3 — Unauthenticated Privilege Escalation (CVE-2025-5304)
> PoC & exploit helper for **PT Project Notebooks** versions **1.0.0–1.1.3**: Missing authorization in `wpnb_pto_new_users_add()` allows unauthenticated attackers to escalate a chosen user’s privileges to **Administrator** via `admin-ajax.php`.
---
## 🧾 Description
The **PT Project Notebooks** plugin for WordPress is vulnerable to **Privilege Escalation** due to missing authorization in the function **`wpnb_pto_new_users_add()`** in versions **1.0.0 through 1.1.3**. This makes it possible for unauthenticated attackers to elevate privileges to those of an **Administrator** for a specified user ID.
- **CVE:** CVE-2025-5304
- **CVSS:** **9.8 (Critical)**
---
## 🛠️ What the script does
- **Version check:** Reads `wp-content/plugins/project-notebooks/readme.txt` and extracts the **Stable tag** to confirm the target is ≤ **1.1.3**.
- **Nonce discovery:** Fetches the site front page and extracts `custom.nonce` and `custom.ajax_url` injected by the plugin into the page (via `wp_localize_script`).
- **Privilege escalation:** Sends a POST to `admin-ajax.php` with `action=wpnb_pto_new_users_add`, the discovered `nonce`, `ids=<UserID>`, and `user_type=2` to copy all **Administrator** capabilities onto the target user.
- **Cookie support:** If the nonce is tied to a logged-in session (site/theme behavior), you must pass the matching `wordpress_logged_in_*` cookie for `wp_verify_nonce()` to succeed.
- **Quiet delay:** Waits 3 seconds before the exploit request (silent mode).
---
## ▶️ Usage
```bash
python3 CVE-2025-5304.py -u "http://TARGET/wordpress" -id 28
python3 CVE-2025-5304.py -u "http://TARGET/wordpress" -id 28 -c "wordpress_logged_in_...=..."
```
---
## 🆘 Built-in Help
```
CVE-2025-5304.py -help
usage: t.py [-h] -u URL -id ID [-c COOKIE] [--skip-version]
CVE-2025-5304 (Nxploited Edition)
options:
-h, --help show this help message and exit
-u, --url URL Target WordPress site URL (e.g. http://127.0.0.1/wordpress)
-id, --id ID User ID to escalate (e.g. 28)
-c, --cookie COOKIE Optional Cookie header value for session-bound nonces
--skip-version Skip readme.txt version check
```
---
## ⚙️ Options explained
- **`-u / --url`** — Base site URL; the tool normalizes it and reads plugin readme + front page.
- **`-id / --id`** — WordPress numeric user ID to escalate (Subscriber is enough).
- **`-c / --cookie`** — Full Cookie header value (e.g., `wordpress_logged_in_*=...`) required if nonce is session-bound.
- **`--skip-version`** — Skip the readme.txt Stable tag check (useful when readme is hidden or customized).
**Notes on nonce & cookie**
- If `custom.nonce` is visible in a private/incognito window, it’s public—no cookie needed.
- If you extracted the nonce while logged in, you must pass the same `wordpress_logged_in_*` cookie with `-c`.
- The exploit must use the exact `custom.ajax_url` (scheme/host/port/path) shown in the page source.
---
## ⚠️ Disclaimer
This repository, PoC, and code are provided for educational and authorized security testing only. You are solely responsible for ensuring you have explicit permission to test targets. The author assumes no liability for misuse or damages arising from the use of this project.
---
**By: Khaled Alenazi (Nxploited)**
文件快照
[4.0K] /data/pocs/5b5b910bd294b3b7fbe46d9a483f74ef66e82399
├── [5.3K] CVE-2025-5304.py
├── [1.5K] LICENSE
├── [3.5K] README.md
└── [ 47] requirements.txt
0 directories, 4 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。