WP Rocket < 3.24.2 | Unauthenticated Remote Code Execution (CVSS 9.8) | CVE-2026-125812
<h1 align="center">CVE-2026-125812</h1>
<p align="center">
<b>WP Rocket < 3.24.2 | Unauthenticated Remote Code Execution</b>
</p>
<p align="center">
<img src="https://img.shields.io/badge/CVSSv3-9.8_Critical-red?style=for-the-badge" alt="CVSS 9.8">
<a href="https://www.python.org/">
<img src="https://img.shields.io/badge/python-%23FFDF76.svg?style=for-the-badge&logo=python&logoColor=black" alt="Python">
</a>
<img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fjoshuavanderpoll%2FCVE-2026-125812&label=Views&countColor=%2337d67a" />
</p>
<p align="center">
<img src="assets/demo.gif" alt="CVE-2026-125812 Demo" width="700">
</p>
## Description
Path traversal vulnerability in WP Rocket's font optimization pipeline allows unauthenticated attackers to write arbitrary files to the WordPress webroot. The attack chain requires only two HTTP requests and no authentication.
**Affected:** WP Rocket < 3.24.2
**CVSS:** 9.8 (Critical)
**CWE:** CWE-22 (Path Traversal)
### How it works
1. **Harvest nonce** : GET any public page, extract the beacon nonce from `rocket_beacon_data` (identical for all anonymous visitors)
2. **Inject font URL** : POST to `wp_ajax_nopriv_rocket_beacon` with a crafted `preload_fonts` URL that embeds `//fonts.googleapis.com/css` (bypasses `is_google_font_url()`)
3. **Trigger write** : On the next page visit, WP Rocket's font optimization pipeline fetches the CSS from the attacker's callback, parses the `url()` inside it, downloads the "font" content, and writes it to disk via an unvalidated path that traverses out of the fonts cache directory
## Features
- **Fully unauthenticated** : Uses WP Rocket's own `nopriv` AJAX endpoint
- **Target fingerprinting** : Server, PHP version, WordPress version, beacon status
- **Multi-target** : Supply a file with one URL per line via `-targets`
- **Minimal PoC** : Stripped-down version in `CVE-2026-125812.min.py`
## Installation
### Linux / macOS
`